Utilities on Games. More...
Functions | |
bool | IsGameOver (const Game &game) |
Returns true if the game is over, that is, if the current position contains a solid connection for one player. | |
bool | SequenceFromPosition (const Game &game, const StoneBoard &pos, MoveSequence &seq) |
If game contains the given position, returns the move history from that position to the current end of the game. | |
void | HistoryToSequence (const MoveSequence &history, PointSequence &sequence) |
Converts a game history into a sequence of points played. |
Utilities on Games.
void GameUtil::HistoryToSequence | ( | const MoveSequence & | history, | |
PointSequence & | sequence | |||
) |
Converts a game history into a sequence of points played.
Definition at line 102 of file Game.cpp.
References Move::point().
Referenced by BookCommands::CmdBookDumpPolarizedLeafs().
bool GameUtil::IsGameOver | ( | const Game & | game | ) |
Returns true if the game is over, that is, if the current position contains a solid connection for one player.
Definition at line 67 of file Game.cpp.
References Game::Board(), GroupBuilder::Build(), and Groups::IsGameOver().
Referenced by HexHtpEngine::CmdGenMove(), and HexHtpEngine::CmdRegGenMove().
bool GameUtil::SequenceFromPosition | ( | const Game & | game, | |
const StoneBoard & | pos, | |||
MoveSequence & | seq | |||
) |
If game contains the given position, returns the move history from that position to the current end of the game.
Definition at line 74 of file Game.cpp.
References Game::Board(), Move::color(), StoneBoard::Const(), Game::History(), LogInfo(), StoneBoard::PlayMove(), Move::point(), and StoneBoard::StartNewGame().