Go to the documentation of this file.00001
00002
00003
00004
00005
00006 #ifndef GO_GTPCOMMANDUTIL_H
00007 #define GO_GTPCOMMANDUTIL_H
00008
00009 #include <cstddef>
00010 #include "SgBlackWhite.h"
00011 #include "SgBoardColor.h"
00012 #include "SgPoint.h"
00013 #include "SgVector.h"
00014
00015 class GtpCommand;
00016 class GoBoard;
00017 template<typename T> class SgPointArray;
00018
00019
00020
00021 namespace GoGtpCommandUtil
00022 {
00023
00024 SgEmptyBlackWhite EmptyBlackWhiteArg(const GtpCommand& cmd,
00025 std::size_t number);
00026
00027 SgBlackWhite BlackWhiteArg(const GtpCommand& cmd, std::size_t number);
00028
00029 SgPoint EmptyPointArg(const GtpCommand& cmd, std::size_t number,
00030 const GoBoard& board);
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 SgVector<SgPoint> GetHandicapStones(int size, int n);
00041
00042 SgMove MoveArg(const GtpCommand& cmd, std::size_t number,
00043 const GoBoard& board);
00044
00045
00046
00047 void ParseMultiStoneArgument(GtpCommand& cmd,
00048 const GoBoard& board,
00049 SgBlackWhite& toPlay,
00050 SgBlackWhite& defender,
00051 SgVector<SgPoint>& crucial);
00052
00053 SgPoint PointArg(const GtpCommand& cmd, const GoBoard& board);
00054
00055 SgPoint PointArg(const GtpCommand& cmd, std::size_t number,
00056 const GoBoard& board);
00057
00058
00059
00060 SgVector<SgPoint> PointListArg(const GtpCommand& cmd, std::size_t number,
00061 const GoBoard& board);
00062
00063
00064 SgVector<SgPoint> PointListArg(const GtpCommand& cmd,
00065 const GoBoard& board);
00066
00067 void RespondNumberArray(GtpCommand& cmd, const SgPointArray<int>& array,
00068 int scale, const GoBoard& board);
00069
00070
00071
00072
00073
00074
00075
00076 std::string SortResponseAnalyzeCommands(const std::string& response);
00077
00078 SgPoint StoneArg(const GtpCommand& cmd, std::size_t number,
00079 const GoBoard& board);
00080 }
00081
00082 inline SgVector<SgPoint> GoGtpCommandUtil::PointListArg(const GtpCommand& cmd,
00083 const GoBoard& board)
00084 {
00085 return PointListArg(cmd, 0, board);
00086 }
00087
00088
00089
00090 #endif // GO_GTPCOMMANDUTIL_H
00091