SimpleStateよりcompactな局面の表現 More...
#include <compactBoard.h>
Public Member Functions | |
| CompactBoard () | |
| CompactBoard (const SimpleState &state) | |
| SimpleState | getState () const |
| const osl::vector< OPiece > & | getPieces () const |
| Player | turn () const |
| std::string | toBase64 () const |
Static Public Member Functions | |
| static const CompactBoard | fromBase64 (const std::string &str) |
Private Attributes | |
| osl::vector< OPiece > | pieces |
| Player | player_to_move |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const CompactBoard &c) |
| std::istream & | operator>> (std::istream &os, CompactBoard &c) |
| bool | operator== (const CompactBoard &, const CompactBoard &) |
| 局面を比較する. | |
SimpleStateよりcompactな局面の表現
Definition at line 59 of file compactBoard.h.
| osl::record::CompactBoard::CompactBoard | ( | ) | [inline] |
Definition at line 62 of file compactBoard.h.
| osl::record::CompactBoard::CompactBoard | ( | const SimpleState & | state | ) | [explicit] |
Definition at line 68 of file compactBoard.cc.
| const osl::record::CompactBoard osl::record::CompactBoard::fromBase64 | ( | const std::string & | str | ) | [static] |
Definition at line 152 of file compactBoard.cc.
References osl::misc::base64Decode(), and osl::record::writeInt().
| const osl::vector<OPiece>& osl::record::CompactBoard::getPieces | ( | ) | const [inline] |
Definition at line 65 of file compactBoard.h.
References pieces.
| osl::SimpleState osl::record::CompactBoard::getState | ( | ) | const |
Definition at line 81 of file compactBoard.cc.
References osl::record::OPiece::getOwner(), osl::record::OPiece::getPtype(), and osl::record::OPiece::getSquare().
Referenced by osl::record::opening::WeightedBook::getBoard().
| std::string osl::record::CompactBoard::toBase64 | ( | ) | const |
Definition at line 127 of file compactBoard.cc.
References osl::misc::base64Encode(), and osl::record::readInt().
| Player osl::record::CompactBoard::turn | ( | ) | const [inline] |
Definition at line 66 of file compactBoard.h.
References player_to_move.
Referenced by osl::record::opening::WeightedBook::getStateIndex(), osl::record::operator<<(), and osl::record::operator==().
| std::ostream& operator<< | ( | std::ostream & | os, |
| const CompactBoard & | c | ||
| ) | [friend] |
| bool operator== | ( | const CompactBoard & | , |
| const CompactBoard & | |||
| ) | [friend] |
局面を比較する.
将棋としての局面(手番や持ち駒を含む)を比較する. NumEffectState等と異なり駒番号は考慮されない.
| std::istream& operator>> | ( | std::istream & | os, |
| CompactBoard & | c | ||
| ) | [friend] |
osl::vector<OPiece> osl::record::CompactBoard::pieces [private] |
Definition at line 75 of file compactBoard.h.
Referenced by getPieces(), osl::record::operator<<(), osl::record::operator==(), and osl::record::operator>>().
Definition at line 76 of file compactBoard.h.
Referenced by osl::record::operator>>(), and turn().
1.7.6.1