Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Public Member Functions | Private Member Functions | Private Attributes

GoGtpExtraCommands Class Reference

Extra GTP commands to access functionality of the Go library. More...

#include <GoGtpExtraCommands.h>

List of all members.

Public Member Functions

 GoGtpExtraCommands (const GoBoard &bd)
 Constructor.
void AddGoGuiAnalyzeCommands (GtpCommand &cmd)
void Register (GtpEngine &engine)
Command Callbacks

void CmdCfgDistance (GtpCommand &cmd)
 Compute the distance from a point as defined in GoBoardUtil::CfgDistance.
void CmdLadder (GtpCommand &cmd)
 Return fast ladder status.
void CmdStaticLadder (GtpCommand &cmd)
 Return static ladder status.

Private Member Functions

void Register (GtpEngine &e, const std::string &command, GtpCallback< GoGtpExtraCommands >::Method method)

Private Attributes

const GoBoardm_bd

Detailed Description

Extra GTP commands to access functionality of the Go library.

Contains commands that are mainly useful for debugging and testing the Go library and that not all Go GTP engines may want to register.

Definition at line 19 of file GoGtpExtraCommands.h.


Constructor & Destructor Documentation

GoGtpExtraCommands::GoGtpExtraCommands ( const GoBoard bd  ) 

Constructor.

Parameters:
bd The game board.

Definition at line 23 of file GoGtpExtraCommands.cpp.


Member Function Documentation

void GoGtpExtraCommands::AddGoGuiAnalyzeCommands ( GtpCommand cmd  ) 

Definition at line 28 of file GoGtpExtraCommands.cpp.

void GoGtpExtraCommands::CmdCfgDistance ( GtpCommand cmd  ) 

Compute the distance from a point as defined in GoBoardUtil::CfgDistance.

This command is compatible with GoGui's analyze command type sboard
Argument: point [max_dist]
Returns: Board of integer numbers

Definition at line 42 of file GoGtpExtraCommands.cpp.

References GoBoard::Anchor(), GtpCommand::ArgMin(), GoBoardUtil::CfgDistance(), GtpCommand::CheckNuArgLessEqual(), GoBoard::IsEmpty(), m_bd, GtpCommand::NuArg(), GoGtpCommandUtil::PointArg(), and GoBoard::Size().

Referenced by Register().

void GoGtpExtraCommands::CmdLadder ( GtpCommand cmd  ) 

Return fast ladder status.

Arguments: prey point
Returns: escaped|captured|unsettled

See also:
FastLadderStatus

Definition at line 62 of file GoGtpExtraCommands.cpp.

References GtpCommand::CheckNuArg(), GO_LADDER_CAPTURED, GO_LADDER_ESCAPED, GO_LADDER_UNSETTLED, GoLadderUtil::LadderStatus(), m_bd, and GoGtpCommandUtil::StoneArg().

Referenced by Register().

void GoGtpExtraCommands::CmdStaticLadder ( GtpCommand cmd  ) 

Return static ladder status.

Arguments: prey point
Returns: escaped|captured|unsettled

See also:
GoStaticLadder

Definition at line 87 of file GoGtpExtraCommands.cpp.

References GtpCommand::CheckNuArg(), GoBoard::GetColor(), GoStaticLadder::IsLadder(), m_bd, SgOppBW(), and GoGtpCommandUtil::StoneArg().

Referenced by Register().

void GoGtpExtraCommands::Register ( GtpEngine engine  ) 

Definition at line 100 of file GoGtpExtraCommands.cpp.

References CmdCfgDistance(), CmdLadder(), and CmdStaticLadder().

void GoGtpExtraCommands::Register ( GtpEngine e,
const std::string &  command,
GtpCallback< GoGtpExtraCommands >::Method  method 
) [private]

Definition at line 107 of file GoGtpExtraCommands.cpp.

References GtpEngine::Register().


Member Data Documentation

Definition at line 43 of file GoGtpExtraCommands.h.

Referenced by CmdCfgDistance(), CmdLadder(), and CmdStaticLadder().


The documentation for this class was generated from the following files:


Sun Mar 13 2011 Doxygen 1.7.1