102 case_t const& cf UNUSED) = 0;
120 if (p.m_piece) os << p.m_piece;
158 int8_t
const ri, int8_t
const ci)
const = 0;
160 int8_t
const ri, int8_t
const ci,
piece_t const cPromotion)
const = 0;
162 int8_t
const ri, int8_t
const ci,
165 int8_t
const ri, int8_t
const ci,
170 piece_t const cPiece, int8_t
const ri, int8_t
const ci)
const;
174 int8_t
const ri, int8_t
const ci)
const;
187 int8_t
const ri, int8_t
const ci)
const override;
189 int8_t
const ri, int8_t
const ci,
190 piece_t const cPromotion)
const override;
193 int8_t
const ri, int8_t
const ci,
196 int8_t
const ri, int8_t
const ci,
206 int8_t
const ri, int8_t
const ci)
const override;
208 int8_t
const ri, int8_t
const ci,
209 piece_t const cPromotion)
const override;
212 int8_t
const ri, int8_t
const ci,
215 int8_t
const ri, int8_t
const ci,
220#pragma GCC diagnostic push
221#pragma GCC diagnostic ignored "-Wunused-parameter"
233 int8_t
const ri, int8_t
const ci)
234 const final {
return false; }
237 int8_t
const ri, int8_t
const ci,
239 const final {
return false; }
241 const final {
return false; }
243 int8_t
const ri, int8_t
const ci,
246 int8_t
const ri, int8_t
const ci,
249 case_t const& cf)
final {
return false; }
256#pragma GCC diagnostic pop
289 int8_t
const ci)
const;
291 int8_t
const ci)
const;
319 int8_t
const ci)
const;
321 int8_t
const ci)
const;
bool hasValidMovePreflightCheck(bBoard &b, case_t const &cf) final
movenum_t GenerateMoves(bBoard const &b, case_t const &cf, bMoveList &ml) final
bool hasValidMovePreflightCheck(bBoard &b, case_t const &cf) final
movenum_t GenerateMoves(bBoard const &b, case_t const &cf, bMoveList &ml) final
movenum_t GenerateMoves(bBoard const &b, case_t const &cf, bMoveList &ml) final
bool hasValidMovePreflightCheck(bBoard &b, case_t const &cf) final
movenum_t addEPMove(bBoard const &b, case_t const &cf, int8_t const ci, bMoveList &ml) const
Test move is possible, e.p.
bool hasValidMovePreflightCheck(bBoard &b, case_t const &cf) final
check if there is at least one move possible currently, relies on full move generation for pawn
movenum_t addNonCapturePawnMove(bBoard const &b, case_t const &cf, bMoveList &ml) const
Test move is possible, single step move non capture move.
movenum_t addCapturePromotionMove(bBoard const &b, case_t const &cf, int8_t const ci, bMoveList &ml) const
movenum_t addCapturePawnMove(bBoard const &b, case_t const &cf, int8_t const ci, bMoveList &ml) const
movenum_t GenerateMoves(bBoard const &b, case_t const &cf, bMoveList &ml) final
movenum_t addNonCaptureDoublePawnMove(bBoard const &b, case_t const &cf, bMoveList &ml) const
movenum_t addNonCapturePromotionMove(bBoard const &b, case_t const &cf, bMoveList &ml) const
movenum_t addMove(bBoard const &b, case_t const &cf, int8_t const ri, int8_t const ci, bMoveList &ml) const final
movenum_t addMoves(bBoard const &b, case_t const &cf, int8_t const ri, int8_t const ci, bMoveList &ml) const final
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 isAttacked(bBoard const &b, case_t const &cf) const override
bool hasValidMovePreflightCheck(bBoard &b, case_t const &cf) final
movenum_t GenerateMoves(bBoard const &b, case_t const &cf, bMoveList &ml) final
bool hasValidMovePreflightCheck(bBoard &b, case_t const &cf) final
movenum_t GenerateMoves(bBoard const &b, case_t const &cf, bMoveList &ml) final
position on board, defined as 255 if invalid used primarily to compose a move or a source or destinat...
bool canMovePreflightCheck(bBoard &b, case_t const &cf, int8_t const ri, int8_t const ci) const final
movenum_t GenerateMoves(bBoard const &b, case_t const &cf, bMoveList &ml) final
movenum_t addMove(bBoard const &b, case_t const &cf, int8_t const ri, int8_t const ci, bMoveList &ml) const final
bool hasValidMovePreflightCheck(bBoard &b, case_t const &cf) final
movenum_t addMoves(bBoard const &b, case_t const &cf, int8_t const ri, int8_t const ci, bMoveList &ml) const final
bool canMovePreflightCheck(bBoard &b, case_t const &cf, int8_t const ri, int8_t const ci, piece_t const cPromotion) const final
bool isAttacked(bBoard const &b, case_t const &cf) const final
virtual bool canMovePreflightCheck(bBoard &b, case_t const &cf, int8_t const ri, int8_t const ci, piece_t const cPromotion) const =0
bPieceColour & operator=(bPieceColour const &)=delete
bPieceColour(bPieceColour const &)=delete
bPieceColour(bPieceColour &&)=delete
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.
virtual bool canMovePreflightCheck(bBoard &b, case_t const &cf, int8_t const ri, int8_t const ci) const =0
virtual movenum_t addMoves(bBoard const &b, case_t const &cf, int8_t const ri, int8_t const ci, bMoveList &ml) const =0
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.
virtual movenum_t addMove(bBoard const &b, case_t const &cf, int8_t const ri, int8_t const ci, bMoveList &ml) const =0
virtual bool isAttacked(bBoard const &b, case_t const &cf) const =0
bPieceColour & operator=(bPieceColour &&)=delete
bPiece & operator=(bPiece &&)=delete
static bool isOwnColour(side_t const s, piece_t const p)
static class member function
virtual bool hasValidMovePreflightCheck(bBoard &b UNUSED, case_t const &cf UNUSED)=0
static bPiece * getPieceClass(piece_t const piece)
static class member function
static cpiece_t getPieceChar(piece_t const p)
static class member function
bPiece & operator=(bPiece const &)=delete
bPiece(bPiece const &)=delete
static bool isBlackPiece(piece_t const p)
static class member function
static bool isWhitePiece(piece_t const p)
static class member function
bPiece(bPiece &&)=default
friend std::ostream & operator<<(std::ostream &os, bPiece const &p)
static bool isOpponent(side_t const s, piece_t const p)
static class member function
virtual movenum_t GenerateMoves(bBoard const &b UNUSED, case_t const &cf UNUSED, bMoveList &ml UNUSED)=0
static const std::string getPieceStrUpper(piece_t const piece)
static class member function
bool hasValidMovePreflightCheck(bBoard &b, case_t const &cf) final
movenum_t GenerateMoves(bBoard const &b, case_t const &cf, bMoveList &ml) final
bool hasValidMovePreflightCheck(bBoard &b, case_t const &cf) final
movenum_t GenerateMoves(bBoard const &b, case_t const &cf, bMoveList &ml) final
bool hasValidMovePreflightCheck(bBoard &b, case_t const &cf) final
movenum_t GenerateMoves(bBoard const &b, case_t const &cf, bMoveList &ml) final
movenum_t addCapturePromotionMove(bBoard const &b, case_t const &cf, int8_t const ci, bMoveList &ml) const
Test move is possible, single step move capture only move.
movenum_t GenerateMoves(bBoard const &b, case_t const &cf, bMoveList &ml) final
bool hasValidMovePreflightCheck(bBoard &b, case_t const &cf) final
check if there is at least one move possible currently, relies on full move generation for pawn
movenum_t addNonCapturePromotionMove(bBoard const &b, case_t const &cf, bMoveList &ml) const
Test move is possible, single step move non capture move.
movenum_t addEPMove(bBoard const &b, case_t const &cf, int8_t const ci, bMoveList &ml) const
Test move is possible, e.p.
movenum_t addCapturePawnMove(bBoard const &b, case_t const &cf, int8_t const ci, bMoveList &ml) const
movenum_t addNonCapturePawnMove(bBoard const &b, case_t const &cf, bMoveList &ml) const
Test move is possible, single step move non capture move.
movenum_t addNonCaptureDoublePawnMove(bBoard const &b, case_t const &cf, bMoveList &ml) const
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.
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 gr...
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.
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 hasValidMovePreflightCheck(bBoard &b, case_t const &cf) final
movenum_t GenerateMoves(bBoard const &b, case_t const &cf, bMoveList &ml) final
movenum_t GenerateMoves(bBoard const &b, case_t const &cf, bMoveList &ml) final
bool hasValidMovePreflightCheck(bBoard &b, case_t const &cf) final
boardbitmap_t destinationbits_knight(case_t const iCase)
boardbitmap_t destinationbits_king(case_t const iCase)
boardbitmap_t destinationbits(case_t const iCase, int8_t const ri, int8_t const ci)