DfsData.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006 #ifndef DFSDATA_H
00007 #define DFSDATA_H
00008
00009 #include "Hex.hpp"
00010 #include "ConstBoard.hpp"
00011
00012 _BEGIN_BENZENE_NAMESPACE_
00013
00014
00015
00016
00017
00018
00019
00020
00021 struct DfsData
00022 {
00023
00024 bool m_win;
00025
00026
00027 int m_flags;
00028
00029
00030 int m_numStates;
00031
00032
00033
00034 int m_numMoves;
00035
00036
00037
00038
00039
00040
00041 HexPoint m_bestMove;
00042
00043
00044
00045
00046 DfsData();
00047
00048
00049 DfsData(bool w, int nstates, int nmoves, HexPoint bmove);
00050
00051
00052
00053
00054
00055
00056 bool Initialized() const;
00057
00058
00059
00060 bool ReplaceWith(const DfsData& other) const;
00061
00062
00063
00064
00065
00066
00067 int PackedSize() const;
00068
00069 byte* Pack() const;
00070
00071 void Unpack(const byte* t);
00072
00073 void Rotate(const ConstBoard& brd);
00074
00075 void Mirror(const ConstBoard& brd);
00076
00077
00078 };
00079
00080 inline DfsData::DfsData()
00081 : m_win(false),
00082 m_flags(0),
00083 m_numStates(0),
00084 m_numMoves(0),
00085 m_bestMove(INVALID_POINT)
00086 {
00087 }
00088
00089 inline DfsData::DfsData(bool w, int nstates, int nmoves, HexPoint bmove)
00090 : m_win(w),
00091 m_flags(0),
00092 m_numStates(nstates),
00093 m_numMoves(nmoves),
00094 m_bestMove(bmove)
00095 {
00096 }
00097
00098 inline bool DfsData::Initialized() const
00099 {
00100 return m_bestMove != INVALID_POINT;
00101 }
00102
00103 inline bool DfsData::ReplaceWith(const DfsData& other) const
00104 {
00105 UNUSED(other);
00106 return true;
00107 }
00108
00109
00110
00111 _END_BENZENE_NAMESPACE_
00112
00113 #endif // DFSDATA_H