Bitboard attackers, stmAttackers, b;
+ assert(!shortcut || from != SQ_NONE);
assert(square_is_ok(from) || from == SQ_NONE);
assert(square_is_ok(to));
Piece capture = piece_on(to);
Bitboard occ = occupied_squares();
+ // King cannot be recaptured
+ if (type_of_piece(piece) == KING)
+ return seeValues[capture];
+
// Handle en passant moves
if (st->epSquare == to && type_of_piece_on(from) == PAWN)
{
for (int i = 0; i < 64; i++)
board[i] = EMPTY;
- for (int i = 0; i < 7; i++)
- for (int j = 0; j < 8; j++)
+ for (int i = 0; i < 8; i++)
+ for (int j = 0; j < 16; j++)
pieceList[0][i][j] = pieceList[1][i][j] = SQ_NONE;
sideToMove = WHITE;