Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoGtpExtraCommands Class Reference

#include <GoGtpExtraCommands.h>

List of all members.


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 21 of file GoGtpExtraCommands.h.

Public Member Functions

 GoGtpExtraCommands (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

GoBoardm_bd


Constructor & Destructor Documentation

GoGtpExtraCommands::GoGtpExtraCommands ( GoBoard bd  ) 

Constructor.

Parameters:
bd The game board.

Definition at line 24 of file GoGtpExtraCommands.cpp.


Member Function Documentation

void GoGtpExtraCommands::AddGoGuiAnalyzeCommands ( GtpCommand cmd  ) 

Definition at line 29 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 44 of file GoGtpExtraCommands.cpp.

References GoBoard::Anchor(), GoBoardUtil::CfgDistance(), GtpCommand::CheckNuArgLessEqual(), GtpCommand::IntArg(), 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 65 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 91 of file GoGtpExtraCommands.cpp.

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

Referenced by Register().

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

Definition at line 111 of file GoGtpExtraCommands.cpp.

References GtpEngine::Register().

void GoGtpExtraCommands::Register ( GtpEngine engine  ) 

Definition at line 104 of file GoGtpExtraCommands.cpp.

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


Member Data Documentation

GoBoard& GoGtpExtraCommands::m_bd [private]

Definition at line 47 of file GoGtpExtraCommands.h.

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


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


17 Jun 2010 Doxygen 1.4.7