kakinoki.h
Go to the documentation of this file.
1 /* kakinoki.h
2  */
3 #ifndef OSL_KAKINOKI_H
4 #define OSL_KAKINOKI_H
5 
6 #include "osl/record/record.h"
7 #include <memory>
8 #include <string>
9 #include <iosfwd>
10 #include <stdexcept>
11 
12 namespace osl
13 {
14  namespace kakinoki
15  {
16  Move strToMove(const std::string&, const SimpleState&,
17  Move last_move=Move());
18  std::pair<Player,Ptype> strToPiece(const std::string&);
19 
20  class KakinokiFile : public RecordFile
21  {
22  public:
23  KakinokiFile(const std::string& filename);
24  ~KakinokiFile();
25 
26  static bool isKakinokiFile(const std::string& filename);
27  static void parseLine(SimpleState& state, Record& record,
28  std::string s, CArray<bool,9>& board_parsed);
29  };
30 
31  struct KakinokiIOError : public std::runtime_error
32  {
33  KakinokiIOError(const std::string& w) : std::runtime_error(w) {
34  }
35  };
36  } // namespace kakinoki
39 }
40 
41 #endif /* OSL_KAKINOKI_H */
42 // ;;; Local Variables:
43 // ;;; mode:c++
44 // ;;; c-basic-offset:2
45 // ;;; End:
KakinokiFile(const std::string &filename)
Definition: kakinoki.cc:218
圧縮していない moveの表現 .
Definition: basic_type.h:1051
std::pair< Player, Ptype > strToPiece(const std::string &)
Definition: kakinoki.cc:156
static void parseLine(SimpleState &state, Record &record, std::string s, CArray< bool, 9 > &board_parsed)
Definition: kakinoki.cc:21
Move strToMove(const std::string &, const SimpleState &, Move last_move=Move())
Definition: kakinoki.cc:167
KakinokiIOError(const std::string &w)
Definition: kakinoki.h:33
static bool isKakinokiFile(const std::string &filename)
Definition: kakinoki.cc:258