1 #ifndef _COMPACT_BOARD_H 2 #define _COMPACT_BOARD_H 19 static_cast<int>(p.
ptype()) << 16 | bitPos);
31 return static_cast<Ptype>((
value >> 16) & 0xf);
37 operator int()
const {
return value; }
65 const std::vector<OPiece>&
pieces()
const {
return piece_vector;};
76 void writeInt(std::ostream& os,
int n);
80 #endif // _COMPACT_BOARD_H std::ostream & operator<<(std::ostream &os, const CompactBoard &c)
bool operator==(const CompactBoard &, const CompactBoard &)
局面を比較する.
std::istream & operator>>(std::istream &os, CompactBoard &c)
static Square bits2Square(const int bit_position)
Converts an integer (bits) to Square.
std::vector< OPiece > piece_vector
static int position2Bits(const Square &pos)
Converts a position to an integer (bits)
const std::vector< OPiece > & pieces() const
int readInt(std::istream &is)
const Square square() const
SimpleStateよりcompactな局面の表現
void writeInt(std::ostream &os, int n)