Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Functions

GoNodeUtil Namespace Reference

Functions

template<class BOARD >
SgNodeCreateRoot (const BOARD &board)
 Create a root node containing a given board position.
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.

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 16 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().

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

Create a root node containing a given board position.

Definition at line 42 of file GoNodeUtil.h.

References CreatePosition(), SG_BLACK, and SG_WHITE.

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 49 of file GoNodeUtil.cpp.

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

Referenced by GoGtpEngine::CmdLoadSgf().

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 28 of file GoNodeUtil.cpp.

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

Referenced by GoGtpEngine::CmdLoadSgf().


Sun Mar 13 2011 Doxygen 1.7.1