recordTracer.h
Go to the documentation of this file.
00001 /* recordTracer.h
00002  */
00003 #ifndef GAME_PLAYING_RECORDTRACER_H
00004 #define GAME_PLAYING_RECORDTRACER_H
00005 
00006 #include "osl/game_playing/openingBookTracer.h"
00007 #include "osl/stl/vector.h"
00008 #include "osl/stl/stack.h"
00009 
00010 namespace osl
00011 {
00012   namespace game_playing
00013   {
00017     class RecordTracer : public OpeningBookTracer
00018     {
00019     public:
00020       typedef vector<Move> moves_t;
00021     private:
00022       const moves_t moves;
00023       stack<int> state_index;
00024       bool verbose;
00025     public:
00026       explicit RecordTracer(const moves_t& moves, bool verbose=false);
00027       RecordTracer(const RecordTracer&);
00028       ~RecordTracer();
00029       OpeningBookTracer* clone() const;
00030 
00031       void update(Move);
00032       const Move selectMove() const;
00033 
00034       int stateIndex() const { return state_index.top(); }
00035       bool isOutOfBook() const;
00036       void popMove();
00037 
00038       static const RecordTracer kisenRecord(const char *filename, int id,
00039                                             unsigned int num_moves,
00040                                             bool verbose);
00041     };
00042   } // namespace game_playing
00043 } // namespace osl
00044 
00045 #endif /* _RECORDTRACER_H */
00046 // ;;; Local Variables:
00047 // ;;; mode:c++
00048 // ;;; c-basic-offset:2
00049 // ;;; coding:utf-8
00050 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines