Belofte version 2.1.8
A promising chess program using the UCI or Winboard interface
|
#include <piece.h>
Public Member Functions | |
bWhitePiece () | |
~bWhitePiece () override | |
bool | canMovePreflightCheck (bBoard &b, case_t const &cf, int8_t const ri, int8_t const ci) const override |
Check if move could be added by just checking there is not check. | |
bool | canMovePreflightCheck (bBoard &b, case_t const &cf, int8_t const ri, int8_t const ci, piece_t const cPromotion) const override |
Check if pawn move could be added by just checking there is not check, case of possible promotion. | |
bool | isAttacked (bBoard 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 ou asap. | |
movenum_t | addMove (bBoard const &b, case_t const &cf, int8_t const ri, int8_t const ci, bMoveList &ml) const final |
Check for in-check position, single step move used for King and Knight. | |
movenum_t | addMoves (bBoard const &b, case_t const &cf, int8_t const ri, int8_t const ci, bMoveList &ml) const final |
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 |
bool | isWhite () const |
bool | isBlack () const |
bool | isEmpty () const |
side_t | invert () |
side_t | opponent () const |
side_t | toMove () const |
Additional Inherited Members | |
![]() | |
bool | isAttackedByPiece (bBoard const &b, column_t const fromcol, rank_t const fromrank, piece_t const cPiece, int8_t const ri, int8_t const ci) const |
Return true if position is attacked by opponent respecting move offsets. | |
bool | isAttackedBySlider (bBoard const &b, column_t const fromcol, rank_t const fromrank, piece_t const cPiece, piece_t const cPiece2, int8_t const ri, int8_t const ci) const |
Return true if position is attacked by opponent respecting move offsets. | |
![]() | |
side_t | m_side = tSide::SIDE_UNDEFINED |
|
overridevirtual |
Check if move could be added by just checking there is not check.
Implements bPieceColour.
Definition at line 408 of file piece.cpp.
Referenced by bWhiteKnight::hasValidMovePreflightCheck(), bWhiteBishop::hasValidMovePreflightCheck(), bWhiteRook::hasValidMovePreflightCheck(), bWhiteQueen::hasValidMovePreflightCheck(), and bWhiteKing::hasValidMovePreflightCheck().
|
overridevirtual |
Check if pawn move could be added by just checking there is not check, case of possible promotion.
Implements bPieceColour.
Definition at line 440 of file piece.cpp.
Check if piece on position is attacked, start with piece always on board and then with pieces with greatest mobility, goal is to break ou asap.
b | board |
cf | piece position |
Implements bPieceColour.
Definition at line 237 of file piece.cpp.
Referenced by bMoveList::addBlackMoveIfValid(), bMoveList::addBlackPromotionIfValid(), bMoveList::addWhiteMoveIfValid(), bMoveList::addWhitePromotionIfValid(), canMovePreflightCheck(), canMovePreflightCheck(), bWhiteKing::GenerateMoves(), and bPositionEvaluation::isGameEnded().
|
finalvirtual |
Check for in-check position, single step move used for King and Knight.
Implements bPieceColour.
Definition at line 536 of file piece.cpp.
Referenced by bWhiteKnight::GenerateMoves(), and bWhiteKing::GenerateMoves().
|
finalvirtual |
Add moves for Queen, Rook and Bishop.
Implements bPieceColour.
Definition at line 576 of file piece.cpp.
Referenced by bWhiteBishop::GenerateMoves(), bWhiteRook::GenerateMoves(), and bWhiteQueen::GenerateMoves().