osl::book::OPSquare Class Reference

Square, Owner, Promoted : 10 bits. More...

`#include <miniBoard.h>`

Inheritance diagram for osl::book::OPSquare:

## Public Member Functions

| OPSquare ()
| OPSquare (const Piece &p)
| OPSquare (const int i)
bool | isPromoted () const
Public Member Functions inherited from osl::book::OSquare
| OSquare ()
| OSquare (const Piece &p)
| OSquare (const int i)
Square | getSquare () const
Player | getOwner () const
| operator int () const

## Static Public Attributes

static const size_t | total_bits = 10
Static Public Attributes inherited from osl::book::OSquare
static const size_t | total_bits = 9

## Additional Inherited Members

Protected Attributes inherited from osl::book::OSquare
int | value

## Detailed Description

Square, Owner, Promoted : 10 bits.

For PAWN, LANCE, KNIGHT, SILVER, BISHOP and ROOK. 1: Promote 0:unpromoted; 1:promoted 2: Owner 0:Black; 1:WHITE 3456: Square x 789A: Square y

Definition at line 64 of file miniBoard.h.

## Constructor & Destructor Documentation

## OPSquare() [1/3]

osl::book::OPSquare::OPSquare | ( |  | ) |

inline

Definition at line 68 of file miniBoard.h.

References osl::book::OSquare::OSquare().

## OPSquare() [2/3]

osl::book::OPSquare::OPSquare | ( | const Piece & | p | ) |

inline

Definition at line 69 of file miniBoard.h.

References osl::Piece::isPromoted(), osl::book::OSquare::OSquare(), and osl::book::OSquare::value.

## OPSquare() [3/3]

osl::book::OPSquare::OPSquare | ( | const int | i | ) |

inline

Definition at line 77 of file miniBoard.h.

References osl::book::OSquare::OSquare().

## Member Function Documentation

## isPromoted()

bool osl::book::OPSquare::isPromoted | ( |  | ) | const

inline

Definition at line 79 of file miniBoard.h.

References osl::book::OSquare::value.

## Member Data Documentation

## total_bits

const size_t osl::book::OPSquare::total_bits = 10

static

Definition at line 67 of file miniBoard.h.

Referenced by osl::book::MiniBoard::fromBase64, and osl::book::MiniBoard::toBits().

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

- miniBoard.h
- miniBoard.cc