構成 | |
class | ParseError |
class | UsiFile |
関数 | |
const Move | strToMove (const std::string &, const NumEffectState &) |
PtypeO | charToPtypeO (char) |
const std::string | show (Move) |
const std::string | show (PtypeO) |
const std::string | show (Piece) |
const std::string | show (const NumEffectState &) |
void | parseBoard (const std::string &board, NumEffectState &) |
盤面を取得する. | |
void | parse (const std::string &line, NumEffectState &) |
[sfen <sfenstring> | startpos ] moves <move1> ... | |
void | parse (const std::string &line, NumEffectState &initial, std::vector< Move > &moves) |
NumEffectState | makeState (const std::string &line) |
void | escape (std::string &str) |
URIやFile systemとして使えるように、文字をescape. | |
void | unescape (std::string &str) |
escapeされた文字を元に戻す. |
osl::PtypeO osl::usi::charToPtypeO | ( | char | c | ) |
参照先 osl::BLACK, osl::psn::charToPtype(), osl::newPtypeO(), と osl::PTYPE_EMPTY.
参照元 parse(), と parseBoard().
void osl::usi::escape | ( | std::string & | str | ) |
URIやFile systemとして使えるように、文字をescape.
これはGPSShogiによる拡張であり、standardではない. str自体が修正される
usiRecord.cc の 12 行で定義されています。
osl::NumEffectState osl::usi::makeState | ( | const std::string & | line | ) |
void osl::usi::parse | ( | const std::string & | line, | |
NumEffectState & | initial, | |||
std::vector< Move > & | moves | |||
) |
参照先 osl::BLACK, charToPtypeO(), osl::getOwner(), osl::getPtype(), osl::HIRATE, osl::SimpleState::init(), osl::SimpleState::initPawnMask(), osl::Move::isNormal(), osl::SimpleState::isValidMove(), osl::NumEffectState::makeMove(), osl::eval::max(), parseBoard(), osl::SimpleState::setPiece(), osl::SimpleState::setTurn(), osl::Square::STAND(), strToMove(), と osl::WHITE.
void osl::usi::parse | ( | const std::string & | line, | |
NumEffectState & | state | |||
) |
[sfen <sfenstring> | startpos ] moves <move1> ...
<movei>
参照先 osl::NumEffectState::copyFrom(), と osl::NumEffectState::makeMove().
void osl::usi::parseBoard | ( | const std::string & | board, | |
NumEffectState & | out | |||
) |
盤面を取得する.
board文字列が不正なときは、ParseErrorがthrowされる.
board | USIの文字列 | |
state | boardの解析結果が出力される |
参照先 osl::canPromote(), charToPtypeO(), osl::getOwner(), osl::getPtype(), osl::SimpleState::init(), osl::promote(), と osl::SimpleState::setPiece().
参照元 parse().
const std::string osl::usi::show | ( | Move | m | ) |
const std::string osl::usi::show | ( | PtypeO | ptypeo | ) |
const std::string osl::usi::show | ( | Piece | p | ) |
参照先 osl::Piece::ptypeO(), と show().
const std::string osl::usi::show | ( | const NumEffectState & | state | ) |
const osl::Move osl::usi::strToMove | ( | const std::string & | str, | |
const NumEffectState & | s | |||
) |
void osl::usi::unescape | ( | std::string & | str | ) |