All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
osl::game_playing::GameManager Class Reference

#include <gameManager.h>

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

List of all members.

Classes

struct  EndGame

Public Member Functions

 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

const Sennichite pushMove (const search::MoveWithComment &, int seconds)
void popMove ()

Protected Attributes

CArray< ComputerPlayer *, 2 > players
CArray< bool, 2 > computers
boost::scoped_ptr< GameStatestate
boost::scoped_ptr< CsaLoggerlogger
TimeKeeper time_keeper

Private Member Functions

ComputerPlayerplayer (Player turn) const

Private Attributes

int byoyomi

Detailed Description

Definition at line 23 of file gameManager.h.


Constructor & Destructor Documentation

Parameters:
black,white0 の場合,その手番をコンピュータにできない
logger所有権移転.new したものを渡す

Definition at line 13 of file gameManager.cc.

References osl::BLACK, computers, players, and osl::WHITE.

Definition at line 25 of file gameManager.cc.


Member Function Documentation

Parameters:
consumed消費時間を返す

Definition at line 86 of file gameManager.cc.

References osl::game_playing::CsaStopwatch::read(), and timer.

bool osl::game_playing::GameManager::isComputer ( Player  turn) const [inline]

Definition at line 53 of file gameManager.h.

References computers, and player().

void osl::game_playing::GameManager::load ( const char *  csa_filename,
bool  verbose = false 
)

Definition at line 50 of file gameManager.cc.

References osl::BLACK, moves, osl::record::csa::show(), and osl::WHITE.

ComputerPlayer* osl::game_playing::GameManager::player ( Player  turn) const [inline, private]

Definition at line 34 of file gameManager.h.

References players.

Referenced by isComputer().

Definition at line 112 of file gameManager.cc.

References osl::BLACK, and osl::WHITE.

const osl::Sennichite osl::game_playing::GameManager::pushMove ( const search::MoveWithComment ,
int  seconds 
) [protected]

Definition at line 97 of file gameManager.cc.

References osl::BLACK, result, and osl::WHITE.

Definition at line 38 of file gameManager.cc.

void osl::game_playing::GameManager::setByoyomi ( int  seconds) [inline]

Definition at line 48 of file gameManager.h.

References byoyomi.

void osl::game_playing::GameManager::setComputerPlayer ( Player  turn,
bool  is_computer 
)

Definition at line 30 of file gameManager.cc.

References players.

Referenced by osl::game_playing::CsaClient::CsaClient().

void osl::game_playing::GameManager::setTimeLeft ( int  black_time,
int  white_time 
)

Definition at line 44 of file gameManager.cc.


Member Data Documentation

Definition at line 32 of file gameManager.h.

Referenced by setByoyomi().

CArray<bool,2> osl::game_playing::GameManager::computers [protected]

Definition at line 27 of file gameManager.h.

Referenced by GameManager(), and isComputer().

boost::scoped_ptr<CsaLogger> osl::game_playing::GameManager::logger [protected]

Definition at line 29 of file gameManager.h.

Definition at line 26 of file gameManager.h.

Referenced by GameManager(), and player().

boost::scoped_ptr<GameState> osl::game_playing::GameManager::state [protected]

Definition at line 28 of file gameManager.h.

Definition at line 30 of file gameManager.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines