Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

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, ReadLine(), 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 GoSetup::m_player, GoSetup::m_stones, and GoBoard::ToPlay().

Referenced by GoBoardUpdater::Update().


17 Jun 2010 Doxygen 1.4.7