Tracks canonical hash. More...
#include <GoAutoBook.h>
Public Member Functions | |
GoAutoBookState (const GoBoard &brd) | |
~GoAutoBookState () | |
GoBoard & | Board () |
const GoBoard & | Board () const |
void | Play (SgMove move) |
void | Undo () |
SgHashCode | GetHashCode () const |
void | Synchronize () |
Private Member Functions | |
void | ComputeHashCode () |
Private Attributes | |
GoBoardSynchronizer | m_synchronizer |
GoBoard | m_brd [8] |
SgHashCode | m_hash |
Tracks canonical hash.
Definition at line 21 of file GoAutoBook.h.
GoAutoBookState::GoAutoBookState | ( | const GoBoard & | brd | ) |
Definition at line 10 of file GoAutoBook.cpp.
References m_brd, m_synchronizer, and GoBoardSynchronizer::SetSubscriber().
GoAutoBookState::~GoAutoBookState | ( | ) |
Definition at line 16 of file GoAutoBook.cpp.
GoBoard & GoAutoBookState::Board | ( | ) |
Definition at line 50 of file GoAutoBook.h.
References m_brd.
Referenced by GoAutoBook::ExportToOldFormat(), GoAutoBook::FindBestChild(), and GoAutoBook::TruncateByDepth().
const GoBoard & GoAutoBookState::Board | ( | ) | const |
Definition at line 55 of file GoAutoBook.h.
References m_brd.
void GoAutoBookState::ComputeHashCode | ( | ) | [private] |
Definition at line 57 of file GoAutoBook.cpp.
References GoBoard::GetHashCodeInclToPlay(), m_brd, and m_hash.
Referenced by Play(), Synchronize(), and Undo().
SgHashCode GoAutoBookState::GetHashCode | ( | ) | const |
Definition at line 20 of file GoAutoBook.cpp.
References m_hash.
Referenced by GoAutoBook::ExportToOldFormat(), GoAutoBook::FindBestChild(), GoAutoBook::Get(), GoAutoBook::Put(), and GoAutoBook::TruncateByDepth().
void GoAutoBookState::Play | ( | SgMove | move | ) |
Definition at line 42 of file GoAutoBook.cpp.
References ComputeHashCode(), GoBoard::GetHashCodeInclToPlay(), m_brd, m_hash, and SgPointUtil::Rotate().
Referenced by GoAutoBook::ExportToOldFormat(), GoAutoBook::FindBestChild(), and GoAutoBook::TruncateByDepth().
void GoAutoBookState::Synchronize | ( | ) |
Definition at line 25 of file GoAutoBook.cpp.
References ComputeHashCode(), GoBoard::Init(), m_brd, m_synchronizer, GoBoard::Move(), GoBoard::MoveNumber(), GoBoard::Play(), GoPlayerMove::Point(), SgPointUtil::Rotate(), GoBoard::Size(), and GoBoardSynchronizer::UpdateSubscriber().
Referenced by GoAutoBook::LookupMove().
void GoAutoBookState::Undo | ( | ) |
Definition at line 50 of file GoAutoBook.cpp.
References ComputeHashCode(), and m_brd.
Referenced by GoAutoBook::ExportToOldFormat(), GoAutoBook::FindBestChild(), and GoAutoBook::TruncateByDepth().
GoBoard GoAutoBookState::m_brd[8] [private] |
Definition at line 43 of file GoAutoBook.h.
Referenced by Board(), ComputeHashCode(), GoAutoBookState(), Play(), Synchronize(), and Undo().
SgHashCode GoAutoBookState::m_hash [private] |
Definition at line 45 of file GoAutoBook.h.
Referenced by ComputeHashCode(), GetHashCode(), and Play().
Definition at line 41 of file GoAutoBook.h.
Referenced by GoAutoBookState(), and Synchronize().