Belofte version 2.1.8
A promising chess program using the UCI or Winboard interface
bPiece Class Referenceabstract

piece representation More...

#include <piece.h>

+ Inheritance diagram for bPiece:

Public Member Functions

 bPiece ()
 
 bPiece (piece_t p)
 
virtual ~bPiece ()
 
 bPiece (bPiece &&)=default
 
 bPiece (bPiece const &)=delete
 
bPieceoperator= (bPiece const &)=delete
 
bPieceoperator= (bPiece &&)=delete
 
piece_t getPiece () const
 
virtual bool hasValidMovePreflightCheck (bBoard &b UNUSED, case_t const &cf UNUSED)=0
 
virtual movenum_t GenerateMoves (bBoard const &b UNUSED, case_t const &cf UNUSED, bMoveList &ml UNUSED)=0
 
side_t toMove () const
 

Static Public Member Functions

static piece_t getPiece (cpiece_t const p)
 static class member function
 
static cpiece_t getPieceChar (piece_t const p)
 static class member function
 
static bPiecegetPieceClass (piece_t const piece)
 static class member function
 
static const std::string getPieceStrUpper (piece_t const piece)
 static class member function
 
static bool isOpponent (side_t const s, piece_t const p)
 static class member function
 
static bool isOwnColour (side_t const s, piece_t const p)
 static class member function
 
static bool isWhitePiece (piece_t const p)
 static class member function
 
static bool isBlackPiece (piece_t const p)
 static class member function
 

Friends

std::ostream & operator<< (std::ostream &os, bPiece const &p)
 

Detailed Description

piece representation

Definition at line 85 of file piece.h.

Constructor & Destructor Documentation

◆ bPiece() [1/4]

bPiece::bPiece ( )

Definition at line 21 of file piece.cpp.

◆ bPiece() [2/4]

bPiece::bPiece ( piece_t  p)
explicit

Definition at line 25 of file piece.cpp.

◆ ~bPiece()

bPiece::~bPiece ( )
virtual

Definition at line 30 of file piece.cpp.

◆ bPiece() [3/4]

bPiece::bPiece ( bPiece &&  )
default

◆ bPiece() [4/4]

bPiece::bPiece ( bPiece const &  )
delete

Member Function Documentation

◆ operator=() [1/2]

bPiece & bPiece::operator= ( bPiece const &  )
delete

◆ operator=() [2/2]

bPiece & bPiece::operator= ( bPiece &&  )
delete

◆ getPiece() [1/2]

piece_t bPiece::getPiece ( ) const
inline

Definition at line 99 of file piece.h.

Referenced by bBasicBoard::bBasicBoard().

+ Here is the caller graph for this function:

◆ hasValidMovePreflightCheck()

virtual bool bPiece::hasValidMovePreflightCheck ( bBoard &b  UNUSED,
case_t const &cf  UNUSED 
)
pure virtual

◆ GenerateMoves()

virtual movenum_t bPiece::GenerateMoves ( bBoard const &b  UNUSED,
case_t const &cf  UNUSED,
bMoveList &ml  UNUSED 
)
pure virtual

◆ toMove()

side_t bPiece::toMove ( ) const

Definition at line 168 of file piece.cpp.

◆ getPiece() [2/2]

piece_t bPiece::getPiece ( cpiece_t const  p)
static

static class member function

Definition at line 184 of file piece.cpp.

◆ getPieceChar()

cpiece_t bPiece::getPieceChar ( piece_t const  p)
static

static class member function

Definition at line 178 of file piece.cpp.

Referenced by bBasicBoard::getFEN(), and bBoard::operator std::string().

+ Here is the caller graph for this function:

◆ getPieceClass()

◆ getPieceStrUpper()

std::string const bPiece::getPieceStrUpper ( piece_t const  piece)
static

static class member function

Definition at line 136 of file piece.cpp.

◆ isOpponent()

bool bPiece::isOpponent ( side_t const  s,
piece_t const  p 
)
static

static class member function

Definition at line 190 of file piece.cpp.

◆ isOwnColour()

bool bPiece::isOwnColour ( side_t const  s,
piece_t const  p 
)
static

static class member function

Definition at line 198 of file piece.cpp.

◆ isWhitePiece()

bool bPiece::isWhitePiece ( piece_t const  p)
static

◆ isBlackPiece()

bool bPiece::isBlackPiece ( piece_t const  p)
static

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
bPiece const &  p 
)
friend

Definition at line 119 of file piece.h.