/usr/include/osl/game_playing/gameManager.h is in libosl-dev 0.6.0-3.3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | /* gameManager.h
*/
#ifndef GAMEPLAYING_GAMEMANAGER_H
#define GAMEPLAYING_GAMEMANAGER_H
#include "osl/misc/carray.h"
#include "osl/game_playing/timeKeeper.h"
#include "osl/move.h"
#include <boost/scoped_ptr.hpp>
namespace osl
{
class Sennichite;
namespace search
{
struct MoveWithComment;
}
namespace game_playing
{
class GameState;
class CsaLogger;
class ComputerPlayer;
class GameManager
{
protected:
CArray<ComputerPlayer*,2> players;
CArray<bool,2> computers;
boost::scoped_ptr<GameState> state;
boost::scoped_ptr<CsaLogger> logger;
TimeKeeper time_keeper;
private:
int byoyomi;
ComputerPlayer *player(Player turn) const
{
return players[turn];
}
public:
struct EndGame {};
/**
* @param black, white 0 の場合,その手番をコンピュータにできない
* @param logger 所有権移転.new したものを渡す
*/
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) { byoyomi = seconds; }
void resetLogger(CsaLogger *l);
void setComputerPlayer(Player turn, bool is_computer);
bool isComputer(Player turn) const
{
return computers[turn] && player(turn);
}
/**
* @param consumed 消費時間を返す
*/
const search::MoveWithComment computeMove(int& consumed);
int eval(Player turn, Move m);
protected:
const Sennichite pushMove(const search::MoveWithComment&, int seconds);
void popMove();
};
} // namespace game_playing
} // namespace osl
#endif /* _GAMEMANAGER_H */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End:
|