#include <gameManager.h>
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< GameState > | state |
boost::scoped_ptr< CsaLogger > | logger |
TimeKeeper | time_keeper |
Private Member Functions | |
ComputerPlayer * | player (Player turn) const |
Private Attributes | |
int | byoyomi |
Definition at line 23 of file gameManager.h.
osl::game_playing::GameManager::GameManager | ( | ComputerPlayer * | black, |
ComputerPlayer * | white, | ||
CsaLogger * | logger | ||
) |
black,white | 0 の場合,その手番をコンピュータにできない |
logger | 所有権移転.new したものを渡す |
Definition at line 13 of file gameManager.cc.
References osl::BLACK, computers, players, and osl::WHITE.
osl::game_playing::GameManager::~GameManager | ( | ) | [virtual] |
Definition at line 25 of file gameManager.cc.
const osl::search::MoveWithComment osl::game_playing::GameManager::computeMove | ( | int & | consumed | ) |
consumed | 消費時間を返す |
Definition at line 86 of file gameManager.cc.
References osl::game_playing::CsaStopwatch::read(), and timer.
int osl::game_playing::GameManager::eval | ( | Player | turn, |
Move | m | ||
) |
bool osl::game_playing::GameManager::isComputer | ( | Player | turn | ) | const [inline] |
Definition at line 53 of file gameManager.h.
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] |
void osl::game_playing::GameManager::popMove | ( | ) | [protected] |
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.
void osl::game_playing::GameManager::resetLogger | ( | CsaLogger * | l | ) |
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.
int osl::game_playing::GameManager::byoyomi [private] |
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.
CArray<ComputerPlayer*,2> osl::game_playing::GameManager::players [protected] |
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.