All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
threadForEachMove.h
Go to the documentation of this file.
1 /* threadForEachMove.h
2  */
3 #ifndef OSL_THREADFOREACHMOVE_H
4 #define OSL_THREADFOREACHMOVE_H
5 
8 #include <boost/shared_ptr.hpp>
9 #include <boost/scoped_ptr.hpp>
10 
11 namespace osl
12 {
13  namespace game_playing
14  {
15  class SearchPlayer;
20  {
21  struct SpeculativeThread;
22  boost::scoped_ptr<SpeculativeThread> speculative_thread0;
23  boost::scoped_ptr<SpeculativeThread> speculative_thread1;
25  public:
26  explicit ThreadForEachMove(int max_threads=1);
28 
29  void setMaxThreads(int new_max_threads)
30  {
31  max_threads = new_max_threads;
32  }
33  void startSpeculative(const boost::shared_ptr<GameState> state,
34  const SearchPlayer& main_player);
35  void stopOtherThan(Move);
36  void stopAll();
37 
38  const MoveWithComment waitResult(Move last_move, int wait_for,
39  SearchPlayer& main_player, int);
40 
41  void selectBestMoveCleanUp();
42  };
43  } // game_playing
44 } // osl
45 
46 #endif /* OSL_THREADFOREACHMOVE_H */
47 // ;;; Local Variables:
48 // ;;; mode:c++
49 // ;;; c-basic-offset:2
50 // ;;; End: