Belofte version 2.1.9
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 (bPiece &&bp)
 
 bPiece (piece_t piece)
 
virtual ~bPiece ()
 
 bPiece (bPiece const &)=delete
 
bPieceoperator= (bPiece const &)=delete
 
bPieceoperator= (bPiece &&)=delete
 
constexpr piece_t getPiece () const
 
virtual bool hasValidMovePreflightCheck (bBasicBoard &b, case_t const &cf)=0
 
virtual movenum_t GenerateMoves (bBasicBoard const &b, case_t const &cf, bMoveList &ml)=0
 
side_t toMove () const
 

Static Public Member Functions

static piece_t getPiece (cpiece_t const piece)
 static class member function
 
static cpiece_t getPieceChar (piece_t const piece)
 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 piece)
 static class member function
 
static bool isOwnColour (side_t const s, piece_t const piece)
 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 &bp)
 

Detailed Description

piece representation

Definition at line 82 of file piece.h.

Constructor & Destructor Documentation

◆ bPiece() [1/4]

bPiece::bPiece ( )
inlineexplicit

◆ bPiece() [2/4]

bPiece::bPiece ( bPiece && bp)
inlineexplicit

Definition at line 86 of file piece.h.

+ Here is the call graph for this function:

◆ bPiece() [3/4]

bPiece::bPiece ( piece_t piece)
inlineexplicit

Definition at line 89 of file piece.h.

◆ ~bPiece()

virtual bPiece::~bPiece ( )
inlinevirtual

Definition at line 92 of file piece.h.

◆ bPiece() [4/4]

bPiece::bPiece ( bPiece const & )
delete
+ Here is the call graph for this function:

Member Function Documentation

◆ operator=() [1/2]

bPiece & bPiece::operator= ( bPiece const & )
delete
+ Here is the call graph for this function:

◆ operator=() [2/2]

bPiece & bPiece::operator= ( bPiece && )
delete
+ Here is the call graph for this function:

◆ getPiece() [1/2]

piece_t bPiece::getPiece ( ) const
inlineconstexpr

Definition at line 101 of file piece.h.

Referenced by bBasicBoard::bBasicBoard().

+ Here is the caller graph for this function:

◆ hasValidMovePreflightCheck()

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

◆ GenerateMoves()

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

◆ toMove()

side_t bPiece::toMove ( ) const

Definition at line 209 of file piece.cpp.

◆ getPiece() [2/2]

piece_t bPiece::getPiece ( cpiece_t const piece)
static

static class member function

Definition at line 225 of file piece.cpp.

◆ getPieceChar()

cpiece_t bPiece::getPieceChar ( piece_t const piece)
static

static class member function

Definition at line 219 of file piece.cpp.

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

+ Here is the caller graph for this function:

◆ getPieceClass()

bPiece * bPiece::getPieceClass ( piece_t const piece)
static

static class member function

Definition at line 160 of file piece.cpp.

Referenced by bMoveList::atLeastOneMovePossible(), and bMoveList::generateMoves().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPieceStrUpper()

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

static class member function

Definition at line 173 of file piece.cpp.

◆ isOpponent()

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

static class member function

Definition at line 231 of file piece.cpp.

◆ isOwnColour()

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

static class member function

Definition at line 239 of file piece.cpp.

◆ isWhitePiece()

◆ isBlackPiece()

Friends And Related Symbol Documentation

◆ operator<<

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

Definition at line 122 of file piece.h.