Skip to content

Commit

Permalink
fixed broken passed pawn mask (hopefully)
Browse files Browse the repository at this point in the history
  • Loading branch information
Icerath committed Jan 9, 2025
1 parent 8e6e226 commit 2831c28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/square.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl Square {
#[must_use]
pub const fn passed_pawn_mask(self, side: Side) -> Bitboard {
let (file, rank) = (self.file(), self.rank());
let mut mask = file.adjacency_mask();
let mut mask = Bitboard(file.adjacency_mask().0 | file.mask().0);
match side {
Side::White => mask.0 <<= (rank.u8() + 1) * 8,
Side::Black => mask.0 >>= (8 - rank.u8()) * 8,
Expand Down

0 comments on commit 2831c28

Please sign in to comment.