Parse kanji records such as "7六歩", the style of which is generally used to write Shogi records in Japanese. [詳細]
#include <kanjiMove.h>
Public メソッド | |
KanjiMove () | |
~KanjiMove () | |
const Move | strToMove (const std::string &, const NumEffectState &state, const Move &last_move) const |
Convert a Japanese string (one token) to a move object. | |
void | setVerbose (bool verbose) |
Square | toSquare (const std::string &) const |
Ptype | toPtype (const std::string &) const |
Static Public メソッド | |
static const KanjiMove & | instance () |
Private 型 | |
typedef std::list< Move > | found_moves_t |
typedef std::unordered_map < std::string, Square > | str2position_t |
typedef std::unordered_map < std::string, Ptype > | str2piece_t |
Private メソッド | |
void | selectCandidates (found_moves_t &found, std::string &str, const Square &to_pos, const Player &player) const |
Private 変数 | |
str2position_t | str2position |
str2piece_t | str2piece |
bool | verbose |
Parse kanji records such as "7六歩", the style of which is generally used to write Shogi records in Japanese.
kanjiMove.h の 19 行で定義されています。
typedef std::list<Move> osl::record::KanjiMove::found_moves_t [private] |
kanjiMove.h の 38 行で定義されています。
typedef std::unordered_map<std::string, Ptype> osl::record::KanjiMove::str2piece_t [private] |
kanjiMove.h の 46 行で定義されています。
typedef std::unordered_map<std::string, Square> osl::record::KanjiMove::str2position_t [private] |
kanjiMove.h の 44 行で定義されています。
osl::record::KanjiMove::KanjiMove | ( | ) |
kanjiMove.cc の 219 行で定義されています。
参照先 osl::record::StandardCharacters::dan, str2piece, str2position, と osl::record::StandardCharacters::suji.
osl::record::KanjiMove::~KanjiMove | ( | ) |
kanjiMove.cc の 255 行で定義されています。
const osl::record::KanjiMove & osl::record::KanjiMove::instance | ( | ) | [static] |
kanjiMove.cc の 493 行で定義されています。
void osl::record::KanjiMove::selectCandidates | ( | found_moves_t & | found, | |
std::string & | str, | |||
const Square & | to_pos, | |||
const Player & | player | |||
) | const [private] |
kanjiMove.cc の 278 行で定義されています。
参照先 osl::misc::eucToLang(), osl::Move::from(), K_HIDARI, K_HIKU, K_MIGI, K_SHITA, K_SUGU, K_UE, K_YUKU, osl::eval::max(), osl::eval::min(), osl::Square::x(), と osl::Square::y().
参照元 strToMove().
void osl::record::KanjiMove::setVerbose | ( | bool | verbose | ) | [inline] |
kanjiMove.h の 31 行で定義されています。
const osl::Move osl::record::KanjiMove::strToMove | ( | const std::string & | orig, | |
const NumEffectState & | state, | |||
const Move & | last_move | |||
) | const |
Convert a Japanese string (one token) to a move object.
eliminate duplicate moves
kanjiMove.cc の 361 行で定義されています。
参照先 osl::BLACK, osl::NumEffectState::generateWithFullUnpromotions(), osl::Move::INVALID(), osl::Move::isDrop(), osl::Move::isPromotion(), K_BLACK_SIGN, K_FUNARI, K_NARU, K_ONAZI, K_RESIGN, osl::Move::oldPtype(), selectCandidates(), osl::Move::to(), toPtype(), toSquare(), osl::SimpleState::turn(), と verbose.
osl::Ptype osl::record::KanjiMove::toPtype | ( | const std::string & | s | ) | const |
osl::Square osl::record::KanjiMove::toSquare | ( | const std::string & | s | ) | const |
str2piece_t osl::record::KanjiMove::str2piece [private] |
kanjiMove.h の 47 行で定義されています。
参照元 KanjiMove(), と toPtype().
kanjiMove.h の 45 行で定義されています。
参照元 KanjiMove(), と toSquare().
bool osl::record::KanjiMove::verbose [private] |
kanjiMove.h の 48 行で定義されています。
参照元 strToMove().