Belofte version 2.1.9
A promising chess program using the UCI or Winboard interface
bWhiteRook Class Reference

#include <piece.h>

+ Inheritance diagram for bWhiteRook:
+ Collaboration diagram for bWhiteRook:

Public Member Functions

 bWhiteRook ()
 
 ~bWhiteRook () override
 
bool hasValidMovePreflightCheck (bBasicBoard &b, case_t const &cf) override
 
movenum_t GenerateMoves (bBasicBoard const &b, case_t const &cf, bMoveList &ml) override
 
- Public Member Functions inherited from bRook
 bRook (piece_t p)
 
 ~bRook () override
 
- Public Member Functions inherited from bPiece
 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
 
side_t toMove () const
 
- Public Member Functions inherited from bWhitePiece
 bWhitePiece ()
 
 ~bWhitePiece () override
 
bool canMovePreflightCheck (bBasicBoard &b, case_t const &cf, case_t const &ct) const override
 Check if any could be added by just checking there.
 
bool canMovePreflightCheck (bBasicBoard &b, case_t const &cf, int8_t const ri, int8_t const ci, uint_fast8_t nMax=1) const override
 Check if any could be added by just checking there is not check, break on first.
 
bool canPawnMovePreflightCheck (bBasicBoard &b, case_t const &cf, int8_t const ri, int8_t const ci) const override
 Check if pawn move could be added by just checking there is not check, case of possible promotion.
 
bool isAttacked (bBasicBoard const &b, case_t const &cf) const override
 Check if piece on position is attacked, start with piece always on board and then with pieces with greatest mobility, goal is to break out asap.
 
movenum_t addMove (bBasicBoard const &b, case_t const &cf, case_t const &ct, bMoveList &ml) const override
 Check for in-check position, used for King and Knight.
 
movenum_t addMoves (bBasicBoard const &b, case_t const &cf, int8_t const ri, int8_t const ci, bMoveList &ml) const override
 Add moves for Queen, Rook and Bishop.
 
- Public Member Functions inherited from bPieceColour
 bPieceColour (side_t s)
 
virtual ~bPieceColour ()
 
 bPieceColour (bPieceColour const &)=delete
 
 bPieceColour (bPieceColour &&)=delete
 
bPieceColouroperator= (bPieceColour const &)=delete
 
bPieceColouroperator= (bPieceColour &&)=delete
 
constexpr bool isWhite () const
 
constexpr bool isBlack () const
 
constexpr bool isEmpty () const
 
constexpr side_t opponent () const
 
constexpr side_t toMove () const
 
side_t invert ()
 

Additional Inherited Members

- Static Public Member Functions inherited from bPiece
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
 
- Protected Member Functions inherited from bPieceColour
bool isAttackedBySlider (bBasicBoard const &b, case_t cf, column_t fromcol, rank_t fromrank, int8_t const ci, int8_t const ri, piece_t const cPiece, piece_t const cPiece2) const
 Return true if position is attacked by opponent respecting move offsets.
 
- Protected Attributes inherited from bPieceColour
side_t m_side = tSide::SIDE_UNDEFINED
 

Detailed Description

Definition at line 450 of file piece.h.

Constructor & Destructor Documentation

◆ bWhiteRook()

bWhiteRook::bWhiteRook ( )
inline

Definition at line 452 of file piece.h.

+ Here is the call graph for this function:

◆ ~bWhiteRook()

bWhiteRook::~bWhiteRook ( )
inlineoverride

Definition at line 455 of file piece.h.

Member Function Documentation

◆ hasValidMovePreflightCheck()

bool bWhiteRook::hasValidMovePreflightCheck ( bBasicBoard & b,
case_t const & cf )
overridevirtual

Implements bPiece.

Definition at line 1014 of file piece.cpp.

+ Here is the call graph for this function:

◆ GenerateMoves()

movenum_t bWhiteRook::GenerateMoves ( bBasicBoard const & b,
case_t const & cf,
bMoveList & ml )
overridevirtual

Implements bPiece.

Definition at line 1032 of file piece.cpp.

+ Here is the call graph for this function: