Debian Codegraph @

old-sample/legacy-checkmate/lib/oraclePoolLastMove.h

raw
1 /* oraclePoolLastMove.h
2 */
3 #ifndef _ORACLEPOOL_LASTMOVE_H
4 #define _ORACLEPOOL_LASTMOVE_H
5
6 #include "osl/move.h"
7 #include "osl/pieceStand.h"
8 #include <boost/scoped_ptr.hpp>
9 #include <cstddef>
10
11 namespace osl
12 {
13 namespace state
14 {
15 class SimpleState;
16 }
17 namespace checkmate
18 {
19 using state::SimpleState;
20 class CheckHashRecord;
21 /**
22 * 前回動いた駒に基づくOracleの管理
23 * 動いてはいけない駒のチェック.
24 * 駒を渡すと詰というチェックはできなくなる.
25 */
26 class OraclePoolLastMove
27 {
28 class Table;
29 std::unique_ptr<Table> oracles;
30 public:
31 explicit OraclePoolLastMove(Player attacker);
32 ~OraclePoolLastMove();
33
34 void addOracle(const SimpleState&,Move last_move, const CheckHashRecord*);
35 const CheckHashRecord *findOracle(const SimpleState&, Move last_move,
36 PieceStand black_stand,
37 unsigned short& oracle_age) const;
38 size_t size() const;
39 };
40
41 } // namespace checkmate
42 } // namespace osl
43
44 #endif /* _ORACLEPOOL_H */
45 // ;;; Local Variables:
46 // ;;; mode:c++
47 // ;;; c-basic-offset:2
48 // ;;; End: