#include <GoAssertBoardRestored.h>
Definition at line 13 of file GoAssertBoardRestored.h.
Public Member Functions | |
GoAssertBoardRestored () | |
Constructor for later explicit call of Init(). | |
GoAssertBoardRestored (const GoBoard &bd) | |
Constructor, calls Init(). | |
~GoAssertBoardRestored () | |
Destructor, calls CheckRestored(). | |
void | AssertRestored () |
Checks with assertions that the state of the board is the same as it was at the last call to Init() or the constructor. | |
void | Init (const GoBoard &bd) |
void | Clear () |
Set to a state, in which the destructor does not call AssertRestored() anymore. | |
Private Member Functions | |
GoAssertBoardRestored (const GoAssertBoardRestored &) | |
Not implemented. | |
GoAssertBoardRestored & | operator= (const GoAssertBoardRestored &) |
Not implemented. | |
Private Attributes | |
const GoBoard * | m_bd |
int | m_size |
SgBlackWhite | m_toPlay |
SgHashCode | m_hash |
Hash code for this board position. | |
int | m_moveNumber |
Current move number. | |
SgBWArray< int > | m_numStones |
GoRules | m_rules |
bool | m_allowKoRepetition |
bool | m_allowAnyRepetition |
bool | m_koModifiesHash |
SgEmptyBlackWhite | m_koColor |
int | m_koLevel |
SgEmptyBlackWhite | m_koLoser |
GoAssertBoardRestored::GoAssertBoardRestored | ( | ) |
Constructor for later explicit call of Init().
Definition at line 75 of file GoAssertBoardRestored.h.
References m_bd.
GoAssertBoardRestored::GoAssertBoardRestored | ( | const GoBoard & | bd | ) |
Constructor, calls Init().
Definition at line 82 of file GoAssertBoardRestored.h.
References Init(), and SG_DEBUG_ONLY.
GoAssertBoardRestored::~GoAssertBoardRestored | ( | ) |
Destructor, calls CheckRestored().
Definition at line 90 of file GoAssertBoardRestored.h.
References AssertRestored().
GoAssertBoardRestored::GoAssertBoardRestored | ( | const GoAssertBoardRestored & | ) | [private] |
Not implemented.
void GoAssertBoardRestored::AssertRestored | ( | ) |
Checks with assertions that the state of the board is the same as it was at the last call to Init() or the constructor.
Definition at line 97 of file GoAssertBoardRestored.h.
References GoBoard::AnyRepetitionAllowed(), GoBoard::GetHashCode(), GoBoard::KoColor(), GoBoard::KoLevel(), GoBoard::KoLoser(), GoBoard::KoModifiesHash(), GoBoard::KoRepetitionAllowed(), m_allowAnyRepetition, m_allowKoRepetition, m_bd, m_hash, m_koColor, m_koLevel, m_koLoser, m_koModifiesHash, m_moveNumber, m_numStones, m_rules, m_size, m_toPlay, GoBoard::MoveNumber(), GoBoard::Rules(), SG_ASSERT, SG_BLACK, SG_WHITE, GoBoard::Size(), GoBoard::ToPlay(), and GoBoard::TotalNumStones().
Referenced by GoModBoard::Lock(), and ~GoAssertBoardRestored().
void GoAssertBoardRestored::Clear | ( | ) |
Set to a state, in which the destructor does not call AssertRestored() anymore.
Definition at line 118 of file GoAssertBoardRestored.h.
References m_bd.
Referenced by GoModBoard::Lock().
void GoAssertBoardRestored::Init | ( | const GoBoard & | bd | ) |
Definition at line 125 of file GoAssertBoardRestored.h.
References GoBoard::AnyRepetitionAllowed(), GoBoard::GetHashCode(), GoBoard::KoColor(), GoBoard::KoLevel(), GoBoard::KoLoser(), GoBoard::KoModifiesHash(), GoBoard::KoRepetitionAllowed(), m_allowAnyRepetition, m_allowKoRepetition, m_bd, m_hash, m_koColor, m_koLevel, m_koLoser, m_koModifiesHash, m_moveNumber, m_numStones, m_rules, m_size, m_toPlay, GoBoard::MoveNumber(), GoBoard::Rules(), SG_DEBUG_ONLY, GoBoard::Size(), GoBoard::ToPlay(), and GoBoard::TotalNumStones().
Referenced by GoAssertBoardRestored(), and GoModBoard::Unlock().
GoAssertBoardRestored& GoAssertBoardRestored::operator= | ( | const GoAssertBoardRestored & | ) | [private] |
Not implemented.
bool GoAssertBoardRestored::m_allowAnyRepetition [private] |
bool GoAssertBoardRestored::m_allowKoRepetition [private] |
const GoBoard* GoAssertBoardRestored::m_bd [private] |
Definition at line 39 of file GoAssertBoardRestored.h.
Referenced by AssertRestored(), Clear(), GoAssertBoardRestored(), and Init().
SgHashCode GoAssertBoardRestored::m_hash [private] |
Hash code for this board position.
Definition at line 46 of file GoAssertBoardRestored.h.
Referenced by AssertRestored(), and Init().
int GoAssertBoardRestored::m_koLevel [private] |
bool GoAssertBoardRestored::m_koModifiesHash [private] |
int GoAssertBoardRestored::m_moveNumber [private] |
Current move number.
Definition at line 49 of file GoAssertBoardRestored.h.
Referenced by AssertRestored(), and Init().
SgBWArray<int> GoAssertBoardRestored::m_numStones [private] |
GoRules GoAssertBoardRestored::m_rules [private] |
int GoAssertBoardRestored::m_size [private] |
SgBlackWhite GoAssertBoardRestored::m_toPlay [private] |