Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Functions

GoSetupUtil Namespace Reference

Functions

GoSetup CreateSetupFromStream (std::streambuf &in, int &boardSize)
 Create a setup instance from text stream.
GoSetup CreateSetupFromString (std::string &in, int &boardSize)
GoSetup CurrentPosSetup (const GoBoard &bd)
 Get a setup instance with the current position on board.

Function Documentation

GoSetup GoSetupUtil::CreateSetupFromStream ( std::streambuf &  in,
int &  boardSize 
)

Create a setup instance from text stream.

Recognizes '0','o','O' for white stones, 'x', 'X', '@' for black stones, '.' and '+' for empty points. Blanks ' ' and tabs are ignored. Lines must be separated by a '
' character.

Definition at line 70 of file GoSetupUtil.cpp.

References GoSetup::m_stones, SgPointSetUtil::Rotate(), SG_BLACK, and SG_WHITE.

Referenced by CreateSetupFromString().

GoSetup GoSetupUtil::CreateSetupFromString ( std::string &  in,
int &  boardSize 
)

Definition at line 96 of file GoSetupUtil.cpp.

References CreateSetupFromStream().

GoSetup GoSetupUtil::CurrentPosSetup ( const GoBoard bd  ) 

Get a setup instance with the current position on board.

Definition at line 103 of file GoSetupUtil.cpp.

References GoBoard::GetColor(), GoSetup::m_player, GoSetup::m_stones, GoBoard::Occupied(), and GoBoard::ToPlay().

Referenced by GoBoardUpdater::Update().


Sun Mar 13 2011 Doxygen 1.7.1