fix shift

This commit is contained in:
2025-03-04 14:10:17 -05:00
parent d82fff2e0a
commit 445f94daf0
2 changed files with 6 additions and 6 deletions

View File

@@ -271,9 +271,8 @@ impl Board {
/// DO NOT USE THIS ALONE, this should be called as a part of
/// [`Board::place`] or [`Board::place_and_prop_unchecked`]
fn propegate_from_dry(&self, coords: CoordPair, starting_color: Piece) -> BitBoard {
let opponent_color = starting_color.flip();
let player_board = *self.board(starting_color);
let opponent_board = *self.board(opponent_color);
let opponent_board = *self.board(starting_color.flip());
let mut flip_mask = BitBoard::new();
let seed = BitBoard::from_coord(coords);
@@ -300,12 +299,12 @@ impl Board {
if current.count() == 0 || !current.intersects(opponent_board) {
break;
}
temp_flips = temp_flips.union(current);
temp_flips |= current;
}
// If terminated on a player piece, keep the flips
if current.intersects(player_board) {
flip_mask = flip_mask.union(temp_flips);
flip_mask |= temp_flips;
}
}