Board position paired with a color to play. More...
#include <HexState.hpp>
Public Member Functions | |
HexState () | |
HexState (unsigned size) | |
HexState (const StoneBoard &brd, HexColor toPlay) | |
StoneBoard & | Position () |
const StoneBoard & | Position () const |
void | SetToPlay (HexColor color) |
HexColor | ToPlay () const |
hash_t | Hash () const |
void | PlayMove (HexPoint move) |
void | UndoMove (HexPoint move) |
Private Member Functions | |
void | FlipColorToPlay () |
Private Attributes | |
StoneBoard | m_brd |
HexColor | m_toPlay |
Board position paired with a color to play.
Definition at line 17 of file HexState.hpp.
HexState::HexState | ( | ) | [inline] |
Definition at line 48 of file HexState.hpp.
HexState::HexState | ( | unsigned | size | ) | [inline] |
Definition at line 52 of file HexState.hpp.
HexState::HexState | ( | const StoneBoard & | brd, | |
HexColor | toPlay | |||
) | [inline] |
Definition at line 58 of file HexState.hpp.
void HexState::FlipColorToPlay | ( | ) | [inline, private] |
Definition at line 101 of file HexState.hpp.
References m_toPlay.
Referenced by PlayMove(), and UndoMove().
hash_t HexState::Hash | ( | ) | const [inline] |
Definition at line 84 of file HexState.hpp.
References StoneBoard::Hash(), m_brd, and m_toPlay.
Referenced by CacheBook::Exists(), SolverDB< HASH, DB, DATA >::Get(), _BEGIN_BENZENE_NAMESPACE_::GetHash(), BookBuilder< PLAYER >::HasBeenVisited(), BookBuilder< PLAYER >::MarkAsVisited(), _BEGIN_BENZENE_NAMESPACE_::NeedToRotate(), CacheBook::operator[](), and SolverDB< HASH, DB, DATA >::Put().
void HexState::PlayMove | ( | HexPoint | move | ) | [inline] |
Definition at line 89 of file HexState.hpp.
References FlipColorToPlay(), m_brd, m_toPlay, and StoneBoard::PlayMove().
Referenced by BookUtil::BestMove(), BookUtil::DumpVisualizationData(), BookUtil::GetMainLineDepth(), BookBuilder< PLAYER >::Worker::operator()(), CacheBook::ParseFile(), DfpnChildren::PlayMove(), and BookBuilder< PLAYER >::PlayMove().
const StoneBoard & HexState::Position | ( | ) | const [inline] |
Definition at line 69 of file HexState.hpp.
References m_brd.
StoneBoard & HexState::Position | ( | ) | [inline] |
Definition at line 64 of file HexState.hpp.
References m_brd.
Referenced by HexStateAssertRestored::AssertRestored(), BookUtil::BestMove(), BookUtil::DumpVisualizationData(), BookBuilder< PLAYER >::GenerateMoves(), PlayAndSolve::GenMove(), StateDB< T >::Get(), SolverDB< HASH, DB, DATA >::Get(), BookBuilder< PLAYER >::GetAllLegalMoves(), _BEGIN_BENZENE_NAMESPACE_::GetHash(), BookUtil::GetMainLineDepth(), PlayAndSolve::SolverThread::operator()(), PlayAndSolve::PlayerThread::operator()(), BookBuilder< PLAYER >::Worker::operator()(), StateDB< T >::Put(), SolverDB< HASH, DB, DATA >::Put(), PerfectPlayer::Search(), ProofUtil::StoreFlippedStates(), ProofUtil::StoreTranspositions(), and BookUtil::Value().
void HexState::SetToPlay | ( | HexColor | color | ) | [inline] |
Definition at line 74 of file HexState.hpp.
References m_toPlay.
HexColor HexState::ToPlay | ( | ) | const [inline] |
Definition at line 79 of file HexState.hpp.
References m_toPlay.
Referenced by HexStateAssertRestored::AssertRestored(), BookBuilder< PLAYER >::GenerateMoves(), PlayAndSolve::GenMove(), BenzenePlayer::GenMove(), PlayAndSolve::SolverThread::operator()(), WolvePlayer::Search(), PerfectPlayer::Search(), MoHexPlayer::Search(), DfsSolver::Solve(), and ProofUtil::StoreFlippedStates().
void HexState::UndoMove | ( | HexPoint | move | ) | [inline] |
Definition at line 95 of file HexState.hpp.
References FlipColorToPlay(), m_brd, and StoneBoard::UndoMove().
Referenced by BookUtil::BestMove(), BookUtil::DumpVisualizationData(), BookUtil::GetMainLineDepth(), DfpnChildren::UndoMove(), and BookBuilder< PLAYER >::UndoMove().
StoneBoard HexState::m_brd [private] |
Definition at line 41 of file HexState.hpp.
Referenced by Hash(), PlayMove(), Position(), and UndoMove().
HexColor HexState::m_toPlay [private] |
Definition at line 43 of file HexState.hpp.
Referenced by FlipColorToPlay(), Hash(), PlayMove(), SetToPlay(), and ToPlay().