diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/board/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/board/mod.rs b/src/board/mod.rs index c889257..a5803ac 100644 --- a/src/board/mod.rs +++ b/src/board/mod.rs @@ -536,7 +536,9 @@ impl Board { let captured_square = Square::from_coords(mov.source.rank(), mov.target.file()); captured_piece = match self.piece_by_square(captured_square) { Some(pawn_type) => { - self.pieces[pawn_type as usize] ^= captured_square.to_bitboard(); + let captured_bb = captured_square.to_bitboard(); + self.pieces[pawn_type as usize] ^= captured_bb; + self.occupancy ^= captured_bb; self.hash ^= self.zobrist_seed[pawn_type as usize* 64 + captured_square as usize]; Some(pawn_type) }, |