Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoNodeUtil Namespace Reference


Functions

SgNodeCreatePosition (int boardSize, SgBlackWhite toPlay, const SgVector< SgPoint > &bPoints, const SgVector< SgPoint > &wPoints)
 Create a position with given size, toPlay, b and w points.
GoKomi GetKomi (const SgNode *node)
 Find komi that is valid for this node.
int GetHandicap (const SgNode *node)
 Find handicap that is valid for this node.
template<class BOARD>
SgNodeCreateRoot (const BOARD &board)
 Create a root node containing a given board position.
template<class BOARD>
SgNodeCreateRoot (const BOARD &board)
 Create a root node containing a given board position.


Function Documentation

SgNode * GoNodeUtil::CreatePosition ( int  boardSize,
SgBlackWhite  toPlay,
const SgVector< SgPoint > &  bPoints,
const SgVector< SgPoint > &  wPoints 
)

Create a position with given size, toPlay, b and w points.

Definition at line 17 of file GoNodeUtil.cpp.

References SgNode::Add(), SG_PROP_ADD_BLACK, SG_PROP_ADD_WHITE, SG_PROP_PLAYER, and SG_PROP_SIZE.

Referenced by CreateRoot().

GoKomi GoNodeUtil::GetKomi ( const SgNode node  ) 

Find komi that is valid for this node.

Search parent nodes until a node with a komi property is found.

Definition at line 29 of file GoNodeUtil.cpp.

References SgNode::Father(), SgNode::GetRealProp(), SgNode::HasProp(), and SG_PROP_KOMI.

Referenced by GoGtpEngine::CmdLoadSgf().

int GoNodeUtil::GetHandicap ( const SgNode node  ) 

Find handicap that is valid for this node.

Search parent nodes until a node with a handicap property is found.

Definition at line 50 of file GoNodeUtil.cpp.

References SgNode::Father(), SgNode::GetIntProp(), SgNode::HasProp(), and SG_PROP_HANDICAP.

Referenced by GoGtpEngine::CmdLoadSgf().

template<class BOARD>
SgNode* GoNodeUtil::CreateRoot ( const BOARD &  board  ) 

Create a root node containing a given board position.

Definition at line 45 of file GoNodeUtil.h.

References CreatePosition(), SG_BLACK, and SG_WHITE.

template<class BOARD>
SgNode* GoNodeUtil::CreateRoot ( const BOARD &  board  ) 

Create a root node containing a given board position.

Definition at line 45 of file GoNodeUtil.h.

References CreatePosition(), SG_BLACK, and SG_WHITE.


17 Jun 2010 Doxygen 1.4.7