00001 /* winCountTracer.h 00002 */ 00003 #ifndef GAME_PLAYING_WINCOUNTTRACER_H 00004 #define GAME_PLAYING_WINCOUNTTRACER_H 00005 00006 #include "osl/game_playing/openingBookTracer.h" 00007 #include "osl/stl/stack.h" 00008 00009 namespace osl 00010 { 00011 namespace record 00012 { 00013 namespace opening 00014 { 00015 class WinCountBook; 00016 } 00017 } 00018 namespace game_playing 00019 { 00023 class WinCountTracer : public OpeningBookTracer 00024 { 00025 public: 00026 typedef record::opening::WinCountBook WinCountBook; 00027 private: 00028 WinCountBook& book; 00029 int state_index; 00030 Player turn; 00031 int randomness; 00032 bool verbose; 00033 osl::stack<int> state_stack; 00034 public: 00035 /* @param randomness ʳξ硤ɤǤʤΨŪ */ 00036 explicit WinCountTracer(WinCountBook&, 00037 int randomness=0, bool verbose=false); 00038 WinCountTracer(const WinCountTracer&); 00039 OpeningBookTracer* clone() const; 00040 00041 void update(Move); 00042 const Move selectMove() const; 00043 00044 int stateIndex() const { return state_index; } 00045 bool isOutOfBook() const; 00046 void popMove(); 00047 }; 00048 } // namespace game_playing 00049 } // namespace osl 00050 00051 #endif /* _WINCOUNTTRACER_H */ 00052 // ;;; Local Variables: 00053 // ;;; mode:c++ 00054 // ;;; c-basic-offset:2 00055 // ;;; End: