All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
osl::game_playing::CuiClient Class Referenceabstract

#include <cuiClient.h>

Inheritance diagram for osl::game_playing::CuiClient:
Inheritance graph
[legend]
Collaboration diagram for osl::game_playing::CuiClient:
Collaboration graph
[legend]

Public Member Functions

 CuiClient (ComputerPlayer *black, ComputerPlayer *white, CsaLogger *l, std::istream &, std::ostream &)
 
 ~CuiClient ()
 
void run (const char *black, const char *white)
 
void run ()
 
volatile int * stopFlag ()
 
- Public Member Functions inherited from osl::game_playing::GameManager
 GameManager (ComputerPlayer *black, ComputerPlayer *white, CsaLogger *logger)
 
virtual ~GameManager ()
 
void load (const char *csa_filename, bool verbose=false)
 
void setTimeLeft (int black_time, int white_time)
 
void setByoyomi (int seconds)
 
void resetLogger (CsaLogger *l)
 
void setComputerPlayer (Player turn, bool is_computer)
 
bool isComputer (Player turn) const
 
const search::MoveWithComment computeMove (int &consumed)
 
int eval (Player turn, Move m)
 

Protected Member Functions

virtual bool readAndProcessCommand ()=0
 
virtual void processComputerMove (const search::MoveWithComment &, int seconds)=0
 
- Protected Member Functions inherited from osl::game_playing::GameManager
const Sennichite pushMove (const search::MoveWithComment &, int seconds)
 
void popMove ()
 

Protected Attributes

std::istream & is
 
std::ostream & os
 
- Protected Attributes inherited from osl::game_playing::GameManager
CArray< ComputerPlayer *, 2 > players
 
CArray< bool, 2 > computers
 
boost::scoped_ptr< GameStatestate
 
boost::scoped_ptr< CsaLoggerlogger
 
TimeKeeper time_keeper
 

Private Attributes

volatile int stop_by_outside
 non-zero value forces resign More...
 

Detailed Description

Definition at line 11 of file cuiClient.h.

Constructor & Destructor Documentation

osl::game_playing::CuiClient::CuiClient ( ComputerPlayer black,
ComputerPlayer white,
CsaLogger l,
std::istream &  i,
std::ostream &  o 
)

Definition at line 9 of file cuiClient.cc.

osl::game_playing::CuiClient::~CuiClient ( )

Definition at line 16 of file cuiClient.cc.

Member Function Documentation

virtual void osl::game_playing::CuiClient::processComputerMove ( const search::MoveWithComment ,
int  seconds 
)
protectedpure virtual
virtual bool osl::game_playing::CuiClient::readAndProcessCommand ( )
protectedpure virtual
Returns
read next command immediately

Implemented in osl::game_playing::CsaClient, and osl::game_playing::GnuShogiClient.

void osl::game_playing::CuiClient::run ( const char *  black,
const char *  white 
)

Definition at line 21 of file cuiClient.cc.

References run().

void osl::game_playing::CuiClient::run ( )

Definition at line 28 of file cuiClient.cc.

References osl::Move::INVALID().

volatile int* osl::game_playing::CuiClient::stopFlag ( )
inline

Definition at line 25 of file cuiClient.h.

References stop_by_outside.

Member Data Documentation

std::istream& osl::game_playing::CuiClient::is
protected

Definition at line 14 of file cuiClient.h.

std::ostream& osl::game_playing::CuiClient::os
protected

Definition at line 15 of file cuiClient.h.

volatile int osl::game_playing::CuiClient::stop_by_outside
private

non-zero value forces resign

Definition at line 18 of file cuiClient.h.

Referenced by stopFlag().


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