Skip to content

Commit

Permalink
Fix typo in Board::is_legal (#315)
Browse files Browse the repository at this point in the history
bench 6578176
  • Loading branch information
sroelants authored Sep 4, 2024
1 parent b2902e0 commit 3de43e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chess/src/movegen/legal_moves.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 3de43e5

Please sign in to comment.