My Project
|
More compact board than CompactBoard. More...
#include <miniBoard.h>
Public Member Functions | |
MiniBoard () | |
MiniBoard (const SimpleState &state) | |
SimpleState | getState () const |
boost::dynamic_bitset | toBits () const |
std::string | toBase64 () const |
Static Public Attributes | |
static const size_t | total_bits = 400 |
Private Types | |
typedef std::vector< OPSquare > | PawnArray |
typedef std::vector< OPSquare > | LanceArray |
typedef std::vector< OPSquare > | KnightArray |
typedef std::vector< OPSquare > | SilverArray |
typedef std::vector< OPSquare > | BishopArray |
typedef std::vector< OPSquare > | RookArray |
typedef std::vector< OSquare > | GoldArray |
typedef osl::CArray< char, 2 > | KingArray |
Friends | |
int | fromBase64 (const std::string &base64, MiniBoard &mb) |
Converts a base64 string to MiniBoard. | |
More compact board than CompactBoard.
400 bits. PAWNs 1 - 180 LANCEs 181 - 220 KNIGHTs 221 - 260 SILVERs 261 - 300 BISHOPs 301 - 320 ROOKs 321 - 340 GOLDs 341 - 376 Black KING 377 - 384 White KING 385 - 392 not used 393 - 399 turn 400 (0: Black; 1:White)
Definition at line 103 of file miniBoard.h.
|
private |
Definition at line 117 of file miniBoard.h.
|
private |
Definition at line 119 of file miniBoard.h.
|
private |
Definition at line 120 of file miniBoard.h.
|
private |
Definition at line 115 of file miniBoard.h.
|
private |
Definition at line 114 of file miniBoard.h.
|
private |
Definition at line 113 of file miniBoard.h.
|
private |
Definition at line 118 of file miniBoard.h.
|
private |
Definition at line 116 of file miniBoard.h.
|
inline |
Definition at line 107 of file miniBoard.h.
|
explicit |
Definition at line 53 of file miniBoard.cc.
References osl::BISHOP, bishop_pieces, osl::BLACK, osl::GOLD, gold_pieces, osl::KING, king_pieces, osl::KNIGHT, knight_pieces, osl::LANCE, lance_pieces, osl::Piece::owner(), osl::PAWN, pawn_pieces, osl::SimpleState::pieceOf(), osl::book::OPiece::position2Bits(), osl::Piece::ptype(), osl::ROOK, rook_pieces, osl::SILVER, silver_pieces, osl::Piece::square(), osl::PieceMask::test(), osl::SimpleState::turn(), turn, osl::unpromote(), and osl::SimpleState::usedMask().
SimpleState osl::book::MiniBoard::getState | ( | ) | const |
Definition at line 112 of file miniBoard.cc.
References osl::BISHOP, bishop_pieces, osl::book::OPiece::bits2Square(), osl::BLACK, osl::GOLD, gold_pieces, osl::SimpleState::init(), osl::KING, king_pieces, osl::KNIGHT, knight_pieces, osl::LANCE, lance_pieces, osl::PAWN, pawn_pieces, osl::promote(), osl::ROOK, rook_pieces, osl::SimpleState::setPiece(), osl::SimpleState::setTurn(), osl::SILVER, silver_pieces, turn, and osl::WHITE.
std::string osl::book::MiniBoard::toBase64 | ( | ) | const |
Definition at line 251 of file miniBoard.cc.
References osl::misc::base64Encode(), and toBits().
boost::dynamic_bitset osl::book::MiniBoard::toBits | ( | ) | const |
Definition at line 178 of file miniBoard.cc.
References osl::CArray< T, Capacity >::begin(), bishop_pieces, osl::BLACK, osl::CArray< T, Capacity >::end(), gold_pieces, king_pieces, knight_pieces, lance_pieces, pawn_pieces, rook_pieces, silver_pieces, osl::book::OSquare::total_bits, osl::book::OPSquare::total_bits, total_bits, and turn.
Referenced by toBase64().
|
friend |
Converts a base64 string to MiniBoard.
Definition at line 257 of file miniBoard.cc.
|
private |
Definition at line 127 of file miniBoard.h.
Referenced by getState(), MiniBoard(), and toBits().
|
private |
Definition at line 129 of file miniBoard.h.
Referenced by getState(), MiniBoard(), and toBits().
|
private |
Definition at line 130 of file miniBoard.h.
Referenced by getState(), MiniBoard(), and toBits().
|
private |
Definition at line 125 of file miniBoard.h.
Referenced by getState(), MiniBoard(), and toBits().
|
private |
Definition at line 124 of file miniBoard.h.
Referenced by getState(), MiniBoard(), and toBits().
|
private |
Definition at line 123 of file miniBoard.h.
Referenced by getState(), MiniBoard(), and toBits().
|
private |
Definition at line 128 of file miniBoard.h.
Referenced by getState(), MiniBoard(), and toBits().
|
private |
Definition at line 126 of file miniBoard.h.
Referenced by getState(), MiniBoard(), and toBits().
|
static |
Definition at line 106 of file miniBoard.h.
Referenced by toBits().
|
private |
Definition at line 131 of file miniBoard.h.
Referenced by getState(), MiniBoard(), and toBits().