My Project
|
Classes | |
class | ParseError |
class | UsiFile |
Functions | |
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> ... <movei> | |
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 | ) |
Definition at line 245 of file usi.cc.
References osl::BLACK, osl::newPtypeO(), osl::PTYPE_EMPTY, and osl::WHITE.
Referenced by parse(), and parseBoard().
void osl::usi::escape | ( | std::string & | str | ) |
URIやFile systemとして使えるように、文字をescape.
これはGPSShogiによる拡張であり、standardではない. @str str自体が修正される
Definition at line 11 of file usiRecord.cc.
osl::NumEffectState osl::usi::makeState | ( | const std::string & | line | ) |
void osl::usi::parse | ( | const std::string & | line, |
NumEffectState & | state | ||
) |
[sfen <sfenstring> | startpos ] moves <move1> ... <movei>
Definition at line 301 of file usi.cc.
References osl::NumEffectState::copyFrom(), osl::NumEffectState::makeMove(), and parse().
Referenced by makeState(), parse(), and osl::usi::UsiFile::UsiFile().
void osl::usi::parse | ( | const std::string & | line, |
NumEffectState & | initial, | ||
std::vector< Move > & | moves | ||
) |
Definition at line 318 of file usi.cc.
References osl::BLACK, charToPtypeO(), osl::getOwner(), osl::getPtype(), osl::HIRATE, osl::SimpleState::init(), osl::SimpleState::initPawnMask(), osl::Move::isNormal(), osl::SimpleState::isValidMove(), osl::NumEffectState::makeMove(), parseBoard(), osl::SimpleState::setPiece(), osl::SimpleState::setTurn(), and osl::WHITE.
void osl::usi::parseBoard | ( | const std::string & | board, |
NumEffectState & | out | ||
) |
盤面を取得する.
board文字列が不正なときは、ParseErrorがthrowされる.
board | USIの文字列 |
state | boardの解析結果が出力される |
Definition at line 255 of file usi.cc.
References osl::canPromote(), charToPtypeO(), osl::getOwner(), osl::getPtype(), osl::SimpleState::init(), osl::promote(), and osl::SimpleState::setPiece().
Referenced by parse().
const std::string osl::usi::show | ( | const NumEffectState & | state | ) |
Definition at line 178 of file usi.cc.
References osl::SimpleState::countPiecesOnStand(), osl::HIRATE, osl::indexToPlayer(), osl::Piece::isEmpty(), osl::newPtypeO(), osl::SimpleState::pieceOnBoard(), osl::SimpleState::turn(), and osl::WHITE.
const std::string osl::usi::show | ( | Move | m | ) |
Definition at line 145 of file usi.cc.
References osl::Move::isNormal(), and osl::Move::isPass().
Referenced by osl::record::CsaFile::makeInfo().
const std::string osl::usi::show | ( | Piece | p | ) |
Definition at line 172 of file usi.cc.
References osl::Piece::ptypeO().
const std::string osl::usi::show | ( | PtypeO | ptypeo | ) |
Definition at line 157 of file usi.cc.
References osl::getOwner(), osl::getPtype(), osl::isPiece(), osl::isPromoted(), osl::unpromote(), and osl::WHITE.
const osl::Move osl::usi::strToMove | ( | const std::string & | str, |
const NumEffectState & | s | ||
) |
Definition at line 225 of file usi.cc.
References osl::SimpleState::turn().
Referenced by osl::record::CsaFile::makeInfo().
void osl::usi::unescape | ( | std::string & | str | ) |
escapeされた文字を元に戻す.
これはGPSShogiによる拡張であり、standardではない. @str str自体が修正される
Definition at line 19 of file usiRecord.cc.