Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Functions

GoGameUtil Namespace Reference

Utility functions for GoGame. More...

Functions

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

Detailed Description

Utility functions for GoGame.


Function Documentation

bool GoGameUtil::GotoBeforeMove ( GoGame 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 454 of file GoGame.cpp.

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

Referenced by GoGtpEngine::CmdLoadSgf().


Sun Mar 13 2011 Doxygen 1.7.1