当前位置: 首页>>代码示例>>C++>>正文


C++ GtpCommand::CheckArgNone方法代码示例

本文整理汇总了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) << ' ';
}
开发者ID:15418-final,项目名称:ParallelizedMCTS,代码行数:8,代码来源:GoBook.cpp

示例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
}
开发者ID:cbordeman,项目名称:gameofgo,代码行数:10,代码来源:SgGtpCommands.cpp

示例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, &regionAttachment);
    SgBWSet safe;
    solver.FindSafePoints(&safe);
    SgPointSet dame = GoSafetyUtil::FindDamePoints(bd, m_bd.AllEmpty(), safe);
    cmd << SgWritePointSet(dame, "", false);
}
开发者ID:ernest-galbrun,项目名称:fuegoia,代码行数:13,代码来源:GoSafetyCommands.cpp

示例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 << "'";
    }
    }
}
开发者ID:15418-final,项目名称:ParallelizedMCTS,代码行数:15,代码来源:GoBook.cpp

示例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);
}
开发者ID:15418-final,项目名称:ParallelizedMCTS,代码行数:12,代码来源:GoBook.cpp

示例6: CmdInfo

/** Show information about current book. */
void GoBookCommands::CmdInfo(GtpCommand& cmd)
{
    cmd.CheckArgNone();
    cmd << SgWriteLabel("FileName") << m_fileName << '\n';
    m_book.WriteInfo(cmd);
}
开发者ID:15418-final,项目名称:ParallelizedMCTS,代码行数:7,代码来源:GoBook.cpp

示例7: CmdClear

void GoBookCommands::CmdClear(GtpCommand& cmd)
{
    cmd.CheckArgNone();
    m_book.Clear();
}
开发者ID:15418-final,项目名称:ParallelizedMCTS,代码行数:5,代码来源:GoBook.cpp

示例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();
}
开发者ID:cbordeman,项目名称:gameofgo,代码行数:8,代码来源:SgGtpCommands.cpp

示例9: CmdPid

/** Return the process ID. */
void SgGtpCommands::CmdPid(GtpCommand& cmd)
{
    cmd.CheckArgNone();
    cmd << getpid();
}
开发者ID:,项目名称:,代码行数:6,代码来源:


注:本文中的GtpCommand::CheckArgNone方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。