00001 /* bookPlayer.h 00002 */ 00003 #ifndef GAME_PLAYING_BOOKPLAYER_H 00004 #define GAME_PLAYING_BOOKPLAYER_H 00005 00006 #include "osl/game_playing/computerPlayer.h" 00007 00008 namespace osl 00009 { 00010 namespace game_playing 00011 { 00012 class OpeningBookTracer; 00016 class BookPlayer : public ComputerPlayer 00017 { 00018 boost::scoped_ptr<OpeningBookTracer> book; 00019 boost::scoped_ptr<ComputerPlayer> searcher; 00020 int book_limit; 00021 int current_moves; 00022 public: 00024 BookPlayer(OpeningBookTracer*, ComputerPlayer*); 00025 ~BookPlayer(); 00026 ComputerPlayer* clone() const; 00027 00029 void setBookLimit(int new_limit); 00030 00031 void pushMove(Move m); 00032 void popMove(); 00033 const MoveWithComment selectBestMove(const GameState&, int seconds, 00034 int byoyomi); 00035 00036 void allowSpeculativeSearch(bool value); 00037 bool bookAvailable() const; 00038 }; 00039 00040 } // namespace game_playing 00041 } // namespace osl 00042 00043 00044 #endif /* GAME_PLAYING_BOOKPLAYER_H */ 00045 // ;;; Local Variables: 00046 // ;;; mode:c++ 00047 // ;;; c-basic-offset:2 00048 // ;;; End: