|
Belofte version 2.2.0
A promising chess program using the UCI or Winboard interface
|
#include <piece.h>
Inheritance diagram for bWhitePiece:
Collaboration diagram for bWhitePiece: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) const override |
| Check if any could be added by just checking there is not check, break on first. | |
| 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 | |
| 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 | |
Static Protected Member Functions inherited from bPieceColour | |
| static 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) |
| Class static function Return true if position is attacked by opponent respecting move offsets. | |
Protected Attributes inherited from bPieceColour | |
| side_t | m_side = tSide::SIDE_UNDEFINED |
|
inline |
|
overridevirtual |
Check if any could be added by just checking there.
Implements bPieceColour.
Definition at line 382 of file piece.cpp.
Referenced by bWhiteBishop::hasValidMovePreflightCheck(), bWhiteKing::hasValidMovePreflightCheck(), bWhiteKnight::hasValidMovePreflightCheck(), bWhiteQueen::hasValidMovePreflightCheck(), and bWhiteRook::hasValidMovePreflightCheck().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Check if any could be added by just checking there is not check, break on first.
Implements bPieceColour.
Definition at line 404 of file piece.cpp.
Here is the call graph for this function:
|
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 bWhitePawn::canMovePreflightCheck(), canMovePreflightCheck(), canMovePreflightCheck(), and bWhiteKing::GenerateMoves().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Check for in-check position, used for King and Knight.
Implements bPieceColour.
Definition at line 551 of file piece.cpp.
Referenced by bWhiteKing::GenerateMoves(), and bWhiteKnight::GenerateMoves().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Add moves for Queen, Rook and Bishop.
Implements bPieceColour.
Definition at line 585 of file piece.cpp.
Referenced by bWhiteBishop::GenerateMoves(), bWhiteQueen::GenerateMoves(), and bWhiteRook::GenerateMoves().
Here is the call graph for this function:
Here is the caller graph for this function: