From 3de43e57ea486d5386cb18624fa466e29427c7aa Mon Sep 17 00:00:00 2001 From: Sam Roelants <15130108+sroelants@users.noreply.github.com> Date: Wed, 4 Sep 2024 20:09:42 +0200 Subject: [PATCH] Fix typo in `Board::is_legal` (#315) bench 6578176 --- chess/src/movegen/legal_moves.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chess/src/movegen/legal_moves.rs b/chess/src/movegen/legal_moves.rs index f345fbd..f9c3809 100644 --- a/chess/src/movegen/legal_moves.rs +++ b/chess/src/movegen/legal_moves.rs @@ -559,7 +559,7 @@ impl Board { // Make sure the move is pseudo-legal. let attacked = match piece.piece_type() { - Pawn if mv.is_capture() => src.pawn_attacks(us) | self.occupied_by(!us), + Pawn if mv.is_capture() => src.pawn_attacks(us), Pawn => src.pawn_squares(us, blockers), Knight => src.knight_squares(), Bishop => src.bishop_squares(blockers),