説明を見る。00001
00002
00003 #ifndef OSL_KAKINOKI_H
00004 #define OSL_KAKINOKI_H
00005
00006 #include "osl/record/record.h"
00007 #include <memory>
00008 #include <string>
00009 #include <iosfwd>
00010 #include <stdexcept>
00011
00012 namespace osl
00013 {
00014 namespace kakinoki
00015 {
00016 Move strToMove(const std::string&, const SimpleState&,
00017 Move last_move=Move());
00018 std::pair<Player,Ptype> strToPiece(const std::string&);
00019
00020 class KakinokiFile : public RecordFile
00021 {
00022 public:
00023 KakinokiFile(const std::string& filename);
00024 ~KakinokiFile();
00025
00026 static bool isKakinokiFile(const std::string& filename);
00027 static void parseLine(SimpleState& state, Record& record,
00028 std::string s, CArray<bool,9>& board_parsed);
00029 };
00030
00031 struct KakinokiIOError : public std::runtime_error
00032 {
00033 KakinokiIOError(const std::string& w) : std::runtime_error(w) {
00034 }
00035 };
00036 }
00037 using kakinoki::KakinokiFile;
00038 using kakinoki::KakinokiIOError;
00039 }
00040
00041 #endif
00042
00043
00044
00045