Belofte version 2.1.9
A promising chess program using the UCI or Winboard interface
|
#include <piece.h>
Public Member Functions | |
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. | |
![]() | |
bPieceColour (side_t s) | |
virtual | ~bPieceColour () |
bPieceColour (bPieceColour const &)=delete | |
bPieceColour (bPieceColour &&)=delete | |
bPieceColour & | operator= (bPieceColour const &)=delete |
bPieceColour & | operator= (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 | |
![]() | |
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. | |
![]() | |
side_t | m_side = tSide::SIDE_UNDEFINED |
|
inline |
|
overridevirtual |
Check if any could be added by just checking there.
Implements bPieceColour.
Definition at line 381 of file piece.cpp.
Referenced by bWhiteBishop::hasValidMovePreflightCheck(), bWhiteKing::hasValidMovePreflightCheck(), bWhiteKnight::hasValidMovePreflightCheck(), bWhiteQueen::hasValidMovePreflightCheck(), and bWhiteRook::hasValidMovePreflightCheck().
|
overridevirtual |
Check if any could be added by just checking there is not check, break on first.
Implements bPieceColour.
Definition at line 403 of file piece.cpp.
|
overridevirtual |
Check if pawn move could be added by just checking there is not check, case of possible promotion.
Implements bPieceColour.
Definition at line 439 of file piece.cpp.
|
overridevirtual |
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.
b | board |
cf | piece position |
Reimplemented from bPieceColour.
Definition at line 269 of file piece.cpp.
Referenced by canMovePreflightCheck(), canMovePreflightCheck(), canPawnMovePreflightCheck(), and bWhiteKing::GenerateMoves().
|
overridevirtual |
Check for in-check position, used for King and Knight.
Implements bPieceColour.
Definition at line 552 of file piece.cpp.
Referenced by bWhiteKing::GenerateMoves(), and bWhiteKnight::GenerateMoves().
|
overridevirtual |
Add moves for Queen, Rook and Bishop.
Implements bPieceColour.
Definition at line 586 of file piece.cpp.
Referenced by bWhiteBishop::GenerateMoves(), bWhiteQueen::GenerateMoves(), and bWhiteRook::GenerateMoves().