cleanup and fix warnings
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
use super::{bitboard::BitBoard, piece::Piece, CoordAxis, CoordPair};
|
||||
use arrayvec::ArrayVec;
|
||||
use rand::seq::IteratorRandom;
|
||||
use std::{cmp::Ordering, fmt};
|
||||
use std::{
|
||||
cmp::Ordering,
|
||||
fmt,
|
||||
ops::{BitAndAssign, BitOrAssign},
|
||||
};
|
||||
|
||||
/// Map of all points on the board against some type T
|
||||
/// Used to index like so: example[i][j]
|
||||
@@ -274,8 +278,8 @@ impl Board {
|
||||
}
|
||||
|
||||
fn apply_flip_mask(&mut self, color: Piece, flip_mask: BitBoard) {
|
||||
*get_board!(mut self, color) |= flip_mask;
|
||||
*get_board!(mut self, color.flip()) &= !flip_mask;
|
||||
get_board!(mut self, color).bitor_assign(flip_mask);
|
||||
get_board!(mut self, color.flip()).bitand_assign(!flip_mask);
|
||||
}
|
||||
|
||||
/// Propegate piece captures originating from (i, j)
|
||||
|
||||
Reference in New Issue
Block a user