fixed en passant offset

This commit is contained in:
Karma Riuk 2025-02-04 21:50:30 +01:00
parent 76310400e8
commit e9c96e83da

View File

@ -183,7 +183,8 @@ Board Board::make_move(Move move) const {
// -- Handle en passant target being eaten
if (move.en_passant)
ret.squares[move.target_square - 8] = Piece::None;
ret.squares[move.target_square + (white_to_play ? -8 : 8)] =
Piece::None;
// -- Handle promotion
if (move.promoting_to != Piece::None)