本文整理汇总了C++中GtpCommand::CheckArgNone方法的典型用法代码示例。如果您正苦于以下问题:C++ GtpCommand::CheckArgNone方法的具体用法?C++ GtpCommand::CheckArgNone怎么用?C++ GtpCommand::CheckArgNone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GtpCommand
的用法示例。
在下文中一共展示了GtpCommand::CheckArgNone方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CmdMoves
void GoBookCommands::CmdMoves(GtpCommand& cmd)
{
cmd.CheckArgNone();
vector<SgPoint> active = m_book.LookupAllMoves(m_bd);
for (vector<SgPoint>::const_iterator it = active.begin();
it != active.end(); ++it)
cmd << SgWritePoint(*it) << ' ';
}
示例2: CmdPid
/** Return the process ID. */
void SgGtpCommands::CmdPid(GtpCommand& cmd)
{
#if WIN32
throw GtpFailure("command not implemented on Windows");
#else
cmd.CheckArgNone();
cmd << getpid();
#endif
}
示例3: CmdDameStatic
/** Return dame points after running static safety algorithm. */
void GoSafetyCommands::CmdDameStatic(GtpCommand& cmd)
{
cmd.CheckArgNone();
GoModBoard modBoard(m_bd);
GoBoard& bd = modBoard.Board();
GoRegionBoard regionAttachment(bd);
GoSafetySolver solver(bd, ®ionAttachment);
SgBWSet safe;
solver.FindSafePoints(&safe);
SgPointSet dame = GoSafetyUtil::FindDamePoints(bd, m_bd.AllEmpty(), safe);
cmd << SgWritePointSet(dame, "", false);
}
示例4: CmdSave
void GoBookCommands::CmdSave(GtpCommand& cmd)
{
if (m_engine.MpiSynchronizer()->IsRootProcess())
{
cmd.CheckArgNone();
if (m_fileName == "")
throw GtpFailure("no filename associated with current book");
ofstream out(m_fileName.c_str());
m_book.Write(out);
if (! out)
{
throw GtpFailure() << "error writing to file '" << m_fileName << "'";
}
}
}
示例5: yellow
/** Show book information for current positions.
This command is compatible with the GoGui analyze command type "gfx".
Moves in the book for the current position are marked with a green
color (active moves), moves that lead to a known position in the book
with yellow (other moves). The status line shows the line number of the
position in the file (0, if unknown) and the number of active and other
moves. */
void GoBookCommands::CmdPosition(GtpCommand& cmd)
{
cmd.CheckArgNone();
PositionInfo(cmd);
}
示例6: CmdInfo
/** Show information about current book. */
void GoBookCommands::CmdInfo(GtpCommand& cmd)
{
cmd.CheckArgNone();
cmd << SgWriteLabel("FileName") << m_fileName << '\n';
m_book.WriteInfo(cmd);
}
示例7: CmdClear
void GoBookCommands::CmdClear(GtpCommand& cmd)
{
cmd.CheckArgNone();
m_book.Clear();
}
示例8: SetSeed
/** Return the current random seed.
See SgRandom::SetSeed(int) for the special meaning of zero and negative
values. */
void SgGtpCommands::CmdGetRandomSeed(GtpCommand& cmd)
{
cmd.CheckArgNone();
cmd << SgRandom::Seed();
}
示例9: CmdPid
/** Return the process ID. */
void SgGtpCommands::CmdPid(GtpCommand& cmd)
{
cmd.CheckArgNone();
cmd << getpid();
}