fixed castle right rook capture coords

This commit is contained in:
Karma Riuk 2025-02-04 21:50:43 +01:00
parent e9c96e83da
commit 609d5f8c98

View File

@ -251,7 +251,7 @@ Board Board::make_move(Move move) const {
}
Coords target = Coords::from_index(move.target_square);
if (move.is_capturing && target.y == 7
if (move.is_capturing && target.y == 0
&& (squares[move.target_square] & 0b111) == Rook) {
if (target.x == 0 && (ret.w_castle_rights & QueenSide))
ret.w_castle_rights &= ~(QueenSide);