fix shift
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user