Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoBoardUpdater Class Reference

#include <GoBoardUpdater.h>

List of all members.


Detailed Description

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 20 of file 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().


Member Function Documentation

void GoBoardUpdater::Update ( const SgNode node,
GoBoard bd 
)

Definition at line 32 of file GoBoardUpdater.cpp.

References GoSetupUtil::CurrentPosSetup(), SgNode::Father(), SgNode::Get(), GetPlayer(), GO_DEFAULT_SIZE, SgNode::HasProp(), GoBoard::Init(), SgUtil::InRange(), m_nodes, GoSetup::m_player, GoBoard::Occupied(), GoBoard::Play(), 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, and SG_WHITE.

Referenced by GoGameRecord::GoToNode().


Member Data Documentation

std::vector<const SgNode*> GoBoardUpdater::m_nodes [private]

Local variable used in Update().

Member variable for avoiding frequent new memory allocations.

Definition at line 29 of file GoBoardUpdater.h.

Referenced by Update().


The documentation for this class was generated from the following files:


17 Jun 2010 Doxygen 1.4.7