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 &) |
盤面を取得する. More... | |
void | parse (const std::string &line, NumEffectState &) |
[sfen <sfenstring> | startpos ] moves <move1> ... More... | |
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. More... | |
void | unescape (std::string &str) |
escapeされた文字を元に戻す. More... | |
osl::PtypeO osl::usi::charToPtypeO | ( | char | c | ) |
Definition at line 246 of file usi.cc.
References osl::BLACK, osl::psn::charToPtype(), osl::newPtypeO(), osl::PTYPE_EMPTY, and osl::WHITE.
Referenced by parse(), parseBoard(), and strToMove().
void osl::usi::escape | ( | std::string & | str | ) |
URIやFile systemとして使えるように、文字をescape.
これはGPSShogiによる拡張であり、standardではない. str自体が修正される
Definition at line 12 of file usiRecord.cc.
References unescape().
Referenced by osl::checkmate::Dfpn::generateCheck().
osl::NumEffectState osl::usi::makeState | ( | const std::string & | line | ) |
Definition at line 312 of file usi.cc.
References parse().
Referenced by osl::usi::ParseError::ParseError().
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(), and osl::NumEffectState::makeMove().
Referenced by makeState(), osl::usi::ParseError::ParseError(), 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(), osl::eval::max(), parseBoard(), osl::SimpleState::setPiece(), osl::SimpleState::setTurn(), osl::csa::strToMove(), 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(), and osl::usi::ParseError::ParseError().
const std::string osl::usi::show | ( | Move | m | ) |
Definition at line 146 of file usi.cc.
References osl::Move::isNormal(), osl::Move::isPass(), and osl::csa::show().
Referenced by osl::psn::charToPtype(), osl::record::CsaFile::makeInfo(), osl::psn::ParseError::ParseError(), and show().
const std::string osl::usi::show | ( | PtypeO | ptypeo | ) |
Definition at line 158 of file usi.cc.
References osl::getOwner(), osl::getPtype(), osl::isPiece(), osl::isPromoted(), show(), osl::csa::show(), osl::unpromote(), and osl::WHITE.
const std::string osl::usi::show | ( | Piece | p | ) |
Definition at line 173 of file usi.cc.
References osl::Piece::ptypeO(), show(), and osl::csa::show().
const std::string osl::usi::show | ( | const NumEffectState & | state | ) |
Definition at line 179 of file usi.cc.
References osl::SimpleState::countPiecesOnStand(), osl::HIRATE, osl::indexToPlayer(), osl::Piece::isEmpty(), osl::newPtypeO(), osl::SimpleState::pieceOnBoard(), osl::csa::show(), strToMove(), osl::SimpleState::turn(), and osl::WHITE.
const osl::Move osl::usi::strToMove | ( | const std::string & | str, |
const NumEffectState & | s | ||
) |
Definition at line 226 of file usi.cc.
References charToPtypeO(), osl::csa::strToMove(), and osl::SimpleState::turn().
Referenced by osl::record::CsaFile::makeInfo(), osl::psn::ParseError::ParseError(), and show().
void osl::usi::unescape | ( | std::string & | str | ) |
escapeされた文字を元に戻す.
これはGPSShogiによる拡張であり、standardではない. str自体が修正される
Definition at line 20 of file usiRecord.cc.
References osl::usi::UsiFile::UsiFile().
Referenced by escape().