Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoGameUtil Namespace Reference


Detailed Description

Utility functions for GoGameRecord.


Functions

bool GotoBeforeMove (GoGameRecord *game, int moveNumber)
 Goto last node in main variation before move number.


Function Documentation

bool GoGameUtil::GotoBeforeMove ( GoGameRecord game,
int  moveNumber 
)

Goto last node in main variation before move number.

This function can be used for implementing the loadsgf GTP command.

Parameters:
game (current node must be root)
moveNumber move number (-1 means goto last node in main variation)
Returns:
false if moveNumber greater than moves in main variation

Definition at line 370 of file GoGame.cpp.

References GoGameRecord::CanGoInDirection(), GoGameRecord::CurrentMoveNumber(), GoGameRecord::CurrentNode(), GoGameRecord::GoInDirection(), SgNode::HasProp(), SgNode::LeftMostSon(), SgNode::NEXT, GoGameRecord::Root(), SG_ASSERT, and SG_PROP_MOVE.

Referenced by GoGtpEngine::CmdLoadSgf().


17 Jun 2010 Doxygen 1.4.7