gnushogi で使われるフォーマット. More...
Classes | |
class | ParseError |
Functions | |
const Move | strToMove (const std::string &, const SimpleState &) |
const Square | strToPos (const std::string &) |
Ptype | charToPtype (char) |
const std::string | show (Move) |
const std::string | show (Square) |
char | show (Ptype) |
const std::string | showXP (Move) |
decorate capture by 'x', promote by '+', and unpromote by '=' More... | |
gnushogi で使われるフォーマット.
何種類かある.
osl::Ptype osl::psn::charToPtype | ( | char | c | ) |
Definition at line 126 of file usi.cc.
References osl::BISHOP, osl::GOLD, osl::KING, osl::KNIGHT, osl::LANCE, osl::PAWN, osl::PTYPE_EMPTY, osl::ROOK, osl::usi::show(), and osl::SILVER.
Referenced by osl::usi::charToPtypeO(), osl::psn::ParseError::ParseError(), strToMove(), and strToPos().
const std::string osl::psn::show | ( | Move | m | ) |
Definition at line 39 of file usi.cc.
References osl::Move::from(), osl::Square::isPieceStand(), osl::Move::promoteMask(), osl::Move::ptype(), osl::csa::show(), showXP(), and osl::Move::to().
Referenced by show().
const std::string osl::psn::show | ( | Square | pos | ) |
Definition at line 9 of file usi.cc.
References show(), osl::Square::x(), and osl::Square::y().
char osl::psn::show | ( | Ptype | ptype | ) |
Definition at line 20 of file usi.cc.
References osl::BISHOP, osl::GOLD, osl::KING, osl::KNIGHT, osl::LANCE, osl::PAWN, osl::ROOK, show(), and osl::SILVER.
const std::string osl::psn::showXP | ( | Move | m | ) |
decorate capture by 'x', promote by '+', and unpromote by '='
Definition at line 58 of file usi.cc.
References osl::canPromote(), osl::Square::canPromote(), osl::Move::capturePtype(), osl::Move::from(), osl::Move::isInvalid(), osl::Move::isPass(), osl::Square::isPieceStand(), osl::Move::isPromotion(), osl::Move::player(), osl::Move::ptype(), osl::PTYPE_EMPTY, osl::csa::show(), strToMove(), and osl::Move::to().
Referenced by osl::psn::ParseError::ParseError(), and show().
const osl::Move osl::psn::strToMove | ( | const std::string & | str, |
const SimpleState & | s | ||
) |
Definition at line 87 of file usi.cc.
References osl::captured(), charToPtype(), osl::isPiece(), osl::SimpleState::pieceOnBoard(), osl::promote(), osl::Piece::ptype(), osl::csa::strToPos(), strToPos(), and osl::SimpleState::turn().
Referenced by showXP().
const osl::Square osl::psn::strToPos | ( | const std::string & | str | ) |
Definition at line 115 of file usi.cc.
References charToPtype().
Referenced by osl::psn::ParseError::ParseError(), and strToMove().