Assert that the board has been restored to previous state. More...
#include <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 |
Assert that the board has been restored to previous state.
Definition at line 13 of file GoAssertBoardRestored.h.
GoAssertBoardRestored::GoAssertBoardRestored | ( | ) |
Constructor for later explicit call of Init().
Definition at line 73 of file GoAssertBoardRestored.h.
References m_bd.
GoAssertBoardRestored::GoAssertBoardRestored | ( | const GoBoard & | bd | ) |
Constructor, calls Init().
Definition at line 80 of file GoAssertBoardRestored.h.
References Init(), and SG_DEBUG_ONLY.
GoAssertBoardRestored::~GoAssertBoardRestored | ( | ) |
Destructor, calls CheckRestored().
Definition at line 88 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 95 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 116 of file GoAssertBoardRestored.h.
References m_bd.
Referenced by GoModBoard::Lock().
void GoAssertBoardRestored::Init | ( | const GoBoard & | bd | ) |
Definition at line 123 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] |
Definition at line 50 of file GoAssertBoardRestored.h.
Referenced by AssertRestored(), and Init().
bool GoAssertBoardRestored::m_allowKoRepetition [private] |
Definition at line 48 of file GoAssertBoardRestored.h.
Referenced by AssertRestored(), and Init().
const GoBoard* GoAssertBoardRestored::m_bd [private] |
Definition at line 32 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 39 of file GoAssertBoardRestored.h.
Referenced by AssertRestored(), and Init().
Definition at line 54 of file GoAssertBoardRestored.h.
Referenced by AssertRestored(), and Init().
int GoAssertBoardRestored::m_koLevel [private] |
Definition at line 56 of file GoAssertBoardRestored.h.
Referenced by AssertRestored(), and Init().
Definition at line 58 of file GoAssertBoardRestored.h.
Referenced by AssertRestored(), and Init().
bool GoAssertBoardRestored::m_koModifiesHash [private] |
Definition at line 52 of file GoAssertBoardRestored.h.
Referenced by AssertRestored(), and Init().
int GoAssertBoardRestored::m_moveNumber [private] |
Current move number.
Definition at line 42 of file GoAssertBoardRestored.h.
Referenced by AssertRestored(), and Init().
SgBWArray<int> GoAssertBoardRestored::m_numStones [private] |
Definition at line 44 of file GoAssertBoardRestored.h.
Referenced by AssertRestored(), and Init().
GoRules GoAssertBoardRestored::m_rules [private] |
Definition at line 46 of file GoAssertBoardRestored.h.
Referenced by AssertRestored(), and Init().
int GoAssertBoardRestored::m_size [private] |
Definition at line 34 of file GoAssertBoardRestored.h.
Referenced by AssertRestored(), and Init().
SgBlackWhite GoAssertBoardRestored::m_toPlay [private] |
Definition at line 36 of file GoAssertBoardRestored.h.
Referenced by AssertRestored(), and Init().