osl::book::MiniBoardChar50 Class Reference

50 byte の盤面. More...

`#include <miniBoardChar50.h>`

## Public Member Functions

| MiniBoardChar50 ()
| MiniBoardChar50 (const SimpleState &)
| MiniBoardChar50 (const std::string &src)
const std::string | toString () const
const SimpleState | toSimpleState (Player turn=BLACK) const

## Private Attributes

CArray< uint8_t, 50 > | data

## Friends

bool | operator< (const MiniBoardChar50 &, const MiniBoardChar50 &)
bool | operator== (const MiniBoardChar50 &, const MiniBoardChar50 &)

## Detailed Description

50 byte の盤面.

手番なし. (常に先手番と解釈). MiniBoardと比較するとbyte access重視の設計.

Definition at line 18 of file miniBoardChar50.h.

## Constructor & Destructor Documentation

## MiniBoardChar50() [1/3]

osl::book::MiniBoardChar50::MiniBoardChar50 | ( |  | ) |

Definition at line 11 of file miniBoardChar50.cc.

References data.

Referenced by operator<, and operator==.

## MiniBoardChar50() [2/3]

osl::book::MiniBoardChar50::MiniBoardChar50 | ( | const SimpleState & | org | ) |

explicit

Definition at line 17 of file miniBoardChar50.cc.

References osl::BLACK, data, osl::Piece::isPromoted(), osl::Piece::owner(), osl::SimpleState::pieceOf(), osl::playerToIndex(), osl::book::OPiece::position2Bits(), osl::Piece::ptype(), osl::Ptype_Table, osl::SimpleState::rotate180(), osl::Piece::SIZE, osl::Piece::square(), osl::SimpleState::turn(), and osl::unpromote().

## MiniBoardChar50() [3/3]

osl::book::MiniBoardChar50::MiniBoardChar50 | ( | const std::string & | src | ) |

explicit

Definition at line 38 of file miniBoardChar50.cc.

References data.

## Member Function Documentation

## toSimpleState()

const osl::SimpleState osl::book::MiniBoardChar50::toSimpleState | ( | Player | turn = BLACK | ) | const

Definition at line 46 of file miniBoardChar50.cc.

References osl::book::OPiece::bits2Square(), osl::BLACK, data, osl::indexToPlayer(), osl::SimpleState::init(), osl::SimpleState::initPawnMask(), osl::Piece_Table, osl::promote(), osl::SimpleState::rotate180(), osl::SimpleState::setPiece(), osl::SimpleState::setTurn(), osl::Piece::SIZE, and osl::SimpleState::turn().

## toString()

const std::string osl::book::MiniBoardChar50::toString | ( |  | ) | const

Definition at line 70 of file miniBoardChar50.cc.

References data.

## Friends And Related Symbol Documentation

## operator<

bool operator< | ( | const MiniBoardChar50 & | ,
|  | const MiniBoardChar50 & | )

friend

References MiniBoardChar50().

## operator==

bool operator== | ( | const MiniBoardChar50 & | ,
|  | const MiniBoardChar50 & | )

friend

References MiniBoardChar50().

## Member Data Documentation

## data

CArray<uint8_t,50> osl::book::MiniBoardChar50::data

private

- 40 byte: Square (各1byte)
- 5 byte: owner (各1bit)
- 5 byte: promote (各1bit)

Definition at line 32 of file miniBoardChar50.h.

Referenced by MiniBoardChar50(), MiniBoardChar50(), MiniBoardChar50(), osl::book::operator<(), osl::book::operator==(), toSimpleState(), and toString().

The documentation for this class was generated from the following files:

- miniBoardChar50.h
- miniBoardChar50.cc