osl::record::OPiece Class Reference

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
osl::record::OPiece Class Reference

`#include <compactBoard.h>`

## Public Member Functions
| OPiece (Piece p)
| OPiece (int i)
Square | getSquare () const
Ptype | getPtype () const
Player | getOwner () const
| operator int () const

## Static Public Member Functions
static int | position2Bits (const Square &pos)
| Converts a position to an integer (bits) More...
static Square | bits2Square (const int bit_position)
| Converts an integer (bits) to Square. More...

## Private Attributes
int | value

## Detailed Description

Definition at line 11 of file compactBoard.h.

## Constructor & Destructor Documentation

osl::record::OPiece::OPiece | ( | Piece | p) |  |
| inline

Definition at line 14 of file compactBoard.h.

References osl::Piece::owner(), position2Bits(), osl::Piece::ptype(), osl::Piece::square(), and value.

osl::record::OPiece::OPiece | ( | int | i) |  |
| inline

Definition at line 21 of file compactBoard.h.

References value.

## Member Function Documentation

osl::Square osl::record::OPiece::bits2Square | ( | const int | bit_position) |  |
| static

Converts an integer (bits) to Square.

Definition at line 17 of file compactBoard.cc.

Referenced by getSquare(), osl::record::OSquare::getSquare(), and osl::record::MiniBoard::getState().

Player osl::record::OPiece::getOwner | ( | ) |  | const
| inline

Definition at line 33 of file compactBoard.h.

References value.

Referenced by osl::record::CompactBoard::getState(), and osl::record::opiece_sort::operator()().

Ptype osl::record::OPiece::getPtype | ( | ) |  | const
| inline

Definition at line 29 of file compactBoard.h.

References value.

Referenced by osl::record::CompactBoard::getState(), and osl::record::opiece_sort::operator()().

Square osl::record::OPiece::getSquare | ( | ) |  | const
| inline

Definition at line 25 of file compactBoard.h.

References bits2Square(), and value.

Referenced by osl::record::CompactBoard::getState(), and osl::record::opiece_sort::operator()().

osl::record::OPiece::operator int | ( | ) |  | const
| inline

Definition at line 37 of file compactBoard.h.

References value.

int osl::record::OPiece::position2Bits | ( | const Square & | pos) |  |
| static

Converts a position to an integer (bits)

Definition at line 11 of file compactBoard.cc.

References osl::Square::isPieceStand(), osl::Square::x(), and osl::Square::y().

Referenced by OPiece(), and osl::record::OSquare::OSquare().

## Member Data Documentation

int osl::record::OPiece::value
| private

Definition at line 44 of file compactBoard.h.

Referenced by getOwner(), getPtype(), getSquare(), operator int(), and OPiece().

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

- compactBoard.h
- compactBoard.cc