All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Attributes | Private Types | Private Attributes | Friends
osl::record::MiniBoard Class Reference

More compact board than CompactBoard. More...

#include <miniBoard.h>

List of all members.

Public Member Functions

 MiniBoard ()
 MiniBoard (const state::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 osl::vector< OPSquarePawnArray
typedef osl::vector< OPSquareLanceArray
typedef osl::vector< OPSquareKnightArray
typedef osl::vector< OPSquareSilverArray
typedef osl::vector< OPSquareBishopArray
typedef osl::vector< OPSquareRookArray
typedef osl::vector< OSquareGoldArray
typedef osl::CArray< char, 2 > KingArray

Private Attributes

PawnArray pawn_pieces
LanceArray lance_pieces
KnightArray knight_pieces
SilverArray silver_pieces
BishopArray bishop_pieces
RookArray rook_pieces
GoldArray gold_pieces
KingArray king_pieces
Player turn

Friends

int fromBase64 (const std::string &base64, MiniBoard &mb)
 Converts a base64 string to MiniBoard.

Detailed Description

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.


Member Typedef Documentation

typedef osl::vector<OPSquare> osl::record::MiniBoard::BishopArray [private]

Definition at line 117 of file miniBoard.h.

typedef osl::vector<OSquare> osl::record::MiniBoard::GoldArray [private]

Definition at line 119 of file miniBoard.h.

typedef osl::CArray<char, 2> osl::record::MiniBoard::KingArray [private]

Definition at line 120 of file miniBoard.h.

typedef osl::vector<OPSquare> osl::record::MiniBoard::KnightArray [private]

Definition at line 115 of file miniBoard.h.

typedef osl::vector<OPSquare> osl::record::MiniBoard::LanceArray [private]

Definition at line 114 of file miniBoard.h.

typedef osl::vector<OPSquare> osl::record::MiniBoard::PawnArray [private]

Definition at line 113 of file miniBoard.h.

typedef osl::vector<OPSquare> osl::record::MiniBoard::RookArray [private]

Definition at line 118 of file miniBoard.h.

typedef osl::vector<OPSquare> osl::record::MiniBoard::SilverArray [private]

Definition at line 116 of file miniBoard.h.


Constructor & Destructor Documentation

Definition at line 107 of file miniBoard.h.


Member Function Documentation

SimpleState osl::record::MiniBoard::getState ( ) const
std::string osl::record::MiniBoard::toBase64 ( ) const

Definition at line 251 of file miniBoard.cc.

References osl::misc::base64Encode(), and toBits().

boost::dynamic_bitset osl::record::MiniBoard::toBits ( ) const

Friends And Related Function Documentation

int fromBase64 ( const std::string &  base64,
MiniBoard mb 
) [friend]

Converts a base64 string to MiniBoard.

Returns:
0 (success); non-zero (failure)

Definition at line 257 of file miniBoard.cc.


Member Data Documentation

Definition at line 127 of file miniBoard.h.

Referenced by osl::record::fromBase64(), getState(), and toBits().

Definition at line 129 of file miniBoard.h.

Referenced by osl::record::fromBase64(), getState(), and toBits().

Definition at line 130 of file miniBoard.h.

Referenced by osl::record::fromBase64(), getState(), and toBits().

Definition at line 125 of file miniBoard.h.

Referenced by osl::record::fromBase64(), getState(), and toBits().

Definition at line 124 of file miniBoard.h.

Referenced by osl::record::fromBase64(), getState(), and toBits().

Definition at line 123 of file miniBoard.h.

Referenced by osl::record::fromBase64(), getState(), and toBits().

Definition at line 128 of file miniBoard.h.

Referenced by osl::record::fromBase64(), getState(), and toBits().

Definition at line 126 of file miniBoard.h.

Referenced by osl::record::fromBase64(), getState(), and toBits().

const size_t osl::record::MiniBoard::total_bits = 400 [static]

Definition at line 106 of file miniBoard.h.

Referenced by osl::record::fromBase64(), and toBits().

Definition at line 131 of file miniBoard.h.

Referenced by osl::record::fromBase64(), getState(), and toBits().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines