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