recordTracer.h Source File

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
recordTracer.h
Go to the documentation of this file.
1 /* recordTracer.h
2 */
3 #ifndef GAME_PLAYING_RECORDTRACER_H
4 #define GAME_PLAYING_RECORDTRACER_H
5
6 #include "osl/game_playing/openingBookTracer.h"
7 #include "osl/stl/vector.h"
8 #include "osl/stl/stack.h"
9
10 namespace osl
11 {
12 namespace game_playing
13 {
17 class RecordTracer : public OpeningBookTracer
18 {
19 public:
20 typedef vector<Move> moves_t;
21 private:
22 const moves_t moves;
23 stack<int> state_index;
24 bool verbose;
25 public:
26 explicit RecordTracer(const moves_t& moves, bool verbose=false);
27 RecordTracer(const RecordTracer&);
28 ~RecordTracer();
29 OpeningBookTracer* clone() const;
30
31 void update(Move);
32 const Move selectMove() const;
33
34 int stateIndex() const { return state_index.top(); }
35 bool isOutOfBook() const;
36 void popMove();
37
38 static const RecordTracer kisenRecord(const char *filename, int id,
39 unsigned int num_moves,
40 bool verbose);
41 };
42 } // namespace game_playing
43 } // namespace osl
44
45 #endif /* _RECORDTRACER_H */
46 // ;;; Local Variables:
47 // ;;; mode:c++
48 // ;;; c-basic-offset:2
49 // ;;; coding:utf-8
50 // ;;; End: