removed attack maps

This commit is contained in:
rektdie committed 2025-03-24 02:08:26 +01:00
1 parent f0cd9d0ee0
commit d0ba47c956
6 files changed
+14 -38

No files matched your search

-12
View File
@@ -299,18 +299,6 @@ Bitboard getPawnPushes(int square, bool color, Bitboard &occupancy) {
return pushes;
}
// Returns bitboard of checkers
static Bitboard Checkers(Board &board, bool color) {
int kingSquare = (board.colors[color] & board.pieces[King]).getLS1BIndex();
Bitboard checkerBoard = 0ULL;
for (int type = Pawn; type < King; type++) {
Bitboard targets = getPieceAttacks(kingSquare, type, color, board.occupied);
checkerBoard |= targets & board.pieces[type] & board.colors[!color];
}
return checkerBoard;
}
// Returns the direction to target from square
static int GetDirection(int square, int target) {
int rankDiff = (target / 8) - (square / 8);