Functions | |
SgEmptyBlackWhite | EmptyBlackWhiteArg (const GtpCommand &cmd, std::size_t number) |
SgBlackWhite | BlackWhiteArg (const GtpCommand &cmd, std::size_t number) |
SgPoint | EmptyPointArg (const GtpCommand &cmd, std::size_t number, const GoBoard &board) |
SgVector< SgPoint > | GetHandicapStones (int size, int n) |
Return the handicap stone locations as defined by the GTP standard. | |
SgMove | MoveArg (const GtpCommand &cmd, std::size_t number, const GoBoard &board) |
void | ParseMultiStoneArgument (GtpCommand &cmd, const GoBoard &board, SgBlackWhite &toPlay, SgBlackWhite &defender, SgVector< SgPoint > &crucial) |
Parse argument list consisting of toPlay followed by list of stones. | |
SgPoint | PointArg (const GtpCommand &cmd, const GoBoard &board) |
SgPoint | PointArg (const GtpCommand &cmd, std::size_t number, const GoBoard &board) |
SgVector< SgPoint > | PointListArg (const GtpCommand &cmd, std::size_t number, const GoBoard &board) |
Return point list argument starting a given argument number to the end of arguments. | |
void | RespondNumberArray (GtpCommand &cmd, const SgPointArray< int > &array, int scale, const GoBoard &board) |
string | SortResponseAnalyzeCommands (const std::string &response) |
Sort response to gogui-analyze_commands alphabetically by label. | |
SgPoint | StoneArg (const GtpCommand &cmd, std::size_t number, const GoBoard &board) |
SgVector< SgPoint > | PointListArg (const GtpCommand &cmd, const GoBoard &board) |
Return point list argument using all arguments. | |
SgVector< SgPoint > | PointListArg (const GtpCommand &cmd, const GoBoard &board) |
Return point list argument using all arguments. |
SgEmptyBlackWhite GoGtpCommandUtil::EmptyBlackWhiteArg | ( | const GtpCommand & | cmd, | |
std::size_t | number | |||
) |
Definition at line 43 of file GoGtpCommandUtil.cpp.
References GtpCommand::ArgToLower(), SG_BLACK, SG_EMPTY, and SG_WHITE.
Referenced by GoGtpEngine::EmptyBlackWhiteArg().
SgBlackWhite GoGtpCommandUtil::BlackWhiteArg | ( | const GtpCommand & | cmd, | |
std::size_t | number | |||
) |
Definition at line 57 of file GoGtpCommandUtil.cpp.
References GtpCommand::ArgToLower(), SG_BLACK, and SG_WHITE.
Referenced by GoGtpEngine::BlackWhiteArg(), GoSafetyCommands::CmdSafe(), and ParseMultiStoneArgument().
SgPoint GoGtpCommandUtil::EmptyPointArg | ( | const GtpCommand & | cmd, | |
std::size_t | number, | |||
const GoBoard & | board | |||
) |
Definition at line 69 of file GoGtpCommandUtil.cpp.
References GoBoard::GetColor(), PointArg(), and SG_EMPTY.
Referenced by GoGtpEngine::EmptyPointArg().
Return the handicap stone locations as defined by the GTP standard.
See GTP version 2 specification, section 4.1.1 Fixed Handicap Placement.
size | Size of the board. | |
n | Number of handicap stones (0, 2, 3, 4, 5, 6, 7, 8, 9). |
GtpFailure | If handicap locations are not defined for this number and board size. |
Definition at line 80 of file GoGtpCommandUtil.cpp.
References Pt(), SgVector< T >::PushBack(), and SG_MAX_SIZE.
Referenced by GoGtpEngine::CmdFixedHandicap(), and GoGtpEngine::CmdPlaceFreeHandicap().
SgMove GoGtpCommandUtil::MoveArg | ( | const GtpCommand & | cmd, | |
std::size_t | number, | |||
const GoBoard & | board | |||
) |
Definition at line 130 of file GoGtpCommandUtil.cpp.
References GtpCommand::ArgToLower(), PointArg(), and SG_PASS.
Referenced by GoGtpEngine::MoveArg().
void GoGtpCommandUtil::ParseMultiStoneArgument | ( | GtpCommand & | cmd, | |
const GoBoard & | board, | |||
SgBlackWhite & | toPlay, | |||
SgBlackWhite & | defender, | |||
SgVector< SgPoint > & | crucial | |||
) |
Parse argument list consisting of toPlay followed by list of stones.
All stones are of the same 'defender' color.
Definition at line 138 of file GoGtpCommandUtil.cpp.
References BlackWhiteArg(), GoBoard::GetColor(), GtpCommand::NuArg(), SgVector< T >::PushBack(), SG_ASSERT, SG_BLACK, SG_WHITE, SgBW(), SgDebug(), and StoneArg().
SgPoint GoGtpCommandUtil::PointArg | ( | const GtpCommand & | cmd, | |
const GoBoard & | board | |||
) |
Definition at line 160 of file GoGtpCommandUtil.cpp.
References GtpCommand::CheckNuArg().
Referenced by GoBookCommands::CmdAdd(), GoGtpExtraCommands::CmdCfgDistance(), GoBookCommands::CmdDelete(), EmptyPointArg(), MoveArg(), GoGtpEngine::PointArg(), PointListArg(), and StoneArg().
SgPoint GoGtpCommandUtil::PointArg | ( | const GtpCommand & | cmd, | |
std::size_t | number, | |||
const GoBoard & | board | |||
) |
Definition at line 167 of file GoGtpCommandUtil.cpp.
References GtpCommand::Arg(), SgMoveUtil::IsCouponMove(), GoBoard::IsValidPoint(), and SG_PASS.
SgVector< SgPoint > GoGtpCommandUtil::PointListArg | ( | const GtpCommand & | cmd, | |
std::size_t | number, | |||
const GoBoard & | board | |||
) |
Return point list argument starting a given argument number to the end of arguments.
Definition at line 185 of file GoGtpCommandUtil.cpp.
References GtpCommand::NuArg(), PointArg(), and SgVector< T >::PushBack().
Referenced by GoGtpEngine::PointListArg(), and PointListArg().
void GoGtpCommandUtil::RespondNumberArray | ( | GtpCommand & | cmd, | |
const SgPointArray< int > & | array, | |||
int | scale, | |||
const GoBoard & | board | |||
) |
Definition at line 195 of file GoGtpCommandUtil.cpp.
Referenced by GoGtpEngine::RespondNumberArray().
std::string GoGtpCommandUtil::SortResponseAnalyzeCommands | ( | const std::string & | response | ) |
Sort response to gogui-analyze_commands alphabetically by label.
Useful if the response to gogui-analyze_commands was concatenated from different components and should be displayed alphabetically.
response | Old response in the format expected by gogui-analyze_commands |
Definition at line 213 of file GoGtpCommandUtil.cpp.
References LessAnalyzeLabel().
SgPoint GoGtpCommandUtil::StoneArg | ( | const GtpCommand & | cmd, | |
std::size_t | number, | |||
const GoBoard & | board | |||
) |
Definition at line 228 of file GoGtpCommandUtil.cpp.
References GoBoard::GetColor(), PointArg(), and SG_EMPTY.
Referenced by GoGtpExtraCommands::CmdLadder(), GoGtpExtraCommands::CmdStaticLadder(), ParseMultiStoneArgument(), and GoGtpEngine::StoneArg().
SgVector<SgPoint> GoGtpCommandUtil::PointListArg | ( | const GtpCommand & | cmd, | |
const GoBoard & | board | |||
) |
Return point list argument using all arguments.
Definition at line 87 of file GoGtpCommandUtil.h.
References PointListArg().
SgVector<SgPoint> GoGtpCommandUtil::PointListArg | ( | const GtpCommand & | cmd, | |
const GoBoard & | board | |||
) |
Return point list argument using all arguments.
Definition at line 87 of file GoGtpCommandUtil.h.
References PointListArg().