Updates a board to a node in a game tree. More...
#include <GoBoardUpdater.h>
Public Member Functions | |
void | Update (const SgNode *node, GoBoard &bd) |
Private Attributes | |
std::vector< const SgNode * > | m_nodes |
Local variable used in Update(). |
Updates a board to a node in a game tree.
This could be a function, but is a class to reuse a locally used list for efficiency. The update is always done from scratch (initializing the board and applying all changes from the root node to the current node).
Definition at line 19 of file GoBoardUpdater.h.
Definition at line 32 of file GoBoardUpdater.cpp.
References GoSetup::AddBlack(), GoSetup::AddWhite(), GoSetupUtil::CurrentPosSetup(), SgNode::Father(), SgNode::Get(), GO_DEFAULT_SIZE, SgNode::HasProp(), GoBoard::Init(), SgUtil::InRange(), m_nodes, GoSetup::m_player, GoSetup::m_stones, GoBoard::Occupied(), GoBoard::Play(), SgPropMove::Player(), GoBoard::SetToPlay(), SG_ASSERT, SG_BLACK, SG_EMPTY, SG_MAX_SIZE, SG_MIN_SIZE, SG_PASS, SG_PROP_ADD_BLACK, SG_PROP_ADD_EMPTY, SG_PROP_ADD_WHITE, SG_PROP_MOVE, SG_PROP_SIZE, SG_WHITE, GoBoard::Size(), SgPropMove::Value(), SgPropAddStone::Value(), and SgPropInt::Value().
Referenced by GoGame::GoToNode().
std::vector<const SgNode*> GoBoardUpdater::m_nodes [private] |
Local variable used in Update().
Member variable for avoiding frequent new memory allocations.
Definition at line 27 of file GoBoardUpdater.h.
Referenced by Update().