My Project
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
osl::book::OPiece Class Reference

#include <compactBoard.h>

Public Member Functions

 OPiece (Piece p)
 
 OPiece (int i)
 
Square square () const
 
Ptype ptype () const
 
Player owner () const
 
 operator int () const
 

Static Public Member Functions

static int position2Bits (const Square &pos)
 Converts a position to an integer (bits)
 
static Square bits2Square (const int bit_position)
 Converts an integer (bits) to Square.
 

Private Attributes

int value
 

Detailed Description

Definition at line 11 of file compactBoard.h.

Constructor & Destructor Documentation

◆ OPiece() [1/2]

osl::book::OPiece::OPiece ( Piece  p)
inline

◆ OPiece() [2/2]

osl::book::OPiece::OPiece ( int  i)
inline

Definition at line 21 of file compactBoard.h.

References value.

Member Function Documentation

◆ bits2Square()

osl::Square osl::book::OPiece::bits2Square ( const int  bit_position)
static

Converts an integer (bits) to Square.

Definition at line 12 of file compactBoard.cc.

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

◆ operator int()

osl::book::OPiece::operator int ( ) const
inline

Definition at line 37 of file compactBoard.h.

References value.

◆ owner()

Player osl::book::OPiece::owner ( ) const
inline

Definition at line 33 of file compactBoard.h.

References value.

Referenced by osl::book::opiece_sort::operator()().

◆ position2Bits()

int osl::book::OPiece::position2Bits ( const Square pos)
static

Converts a position to an integer (bits)

Definition at line 6 of file compactBoard.cc.

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

Referenced by osl::book::MiniBoard::MiniBoard(), OPiece(), and osl::book::OSquare::OSquare().

◆ ptype()

Ptype osl::book::OPiece::ptype ( ) const
inline

Definition at line 29 of file compactBoard.h.

References value.

Referenced by osl::book::opiece_sort::operator()().

◆ square()

Square osl::book::OPiece::square ( ) const
inline

Definition at line 25 of file compactBoard.h.

References bits2Square(), and value.

Referenced by osl::book::opiece_sort::operator()().

Member Data Documentation

◆ value

int osl::book::OPiece::value
private

Definition at line 44 of file compactBoard.h.

Referenced by operator int(), OPiece(), OPiece(), owner(), ptype(), and square().


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