All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
bookPlayer.h
Go to the documentation of this file.
1 /* bookPlayer.h
2  */
3 #ifndef GAME_PLAYING_BOOKPLAYER_H
4 #define GAME_PLAYING_BOOKPLAYER_H
5 
7 
8 namespace osl
9 {
10  namespace game_playing
11  {
12  class OpeningBookTracer;
16  class BookPlayer
17  : public ComputerPlayer,
19  {
20  boost::scoped_ptr<OpeningBookTracer> book;
21  boost::scoped_ptr<ComputerPlayer> searcher;
25  public:
28  ~BookPlayer();
29  ComputerPlayer* clone() const;
30 
32  void setBookLimit(int new_limit);
33 
34  void setInitialState(const NumEffectState&);
35  void pushMove(Move m);
36  void popMove();
37  const MoveWithComment selectBestMove(const GameState&, int seconds, int elapsed,
38  int byoyomi);
39  const MoveWithComment selectBestMoveInTime(const GameState&, const search::TimeAssigned&);
40 
41  bool bookAvailable() const;
42 
43  // delegations ...
44  void allowSpeculativeSearch(bool value);
45  virtual bool stopSearchNow();
47  void setRootIgnoreMoves(const container::MoveVector *rim, bool prediction);
48  private:
49  const Move moveByBook(const GameState& state);
50  };
51 
52  } // namespace game_playing
53 } // namespace osl
54 
55 
56 #endif /* GAME_PLAYING_BOOKPLAYER_H */
57 // ;;; Local Variables:
58 // ;;; mode:c++
59 // ;;; c-basic-offset:2
60 // ;;; End: