clippy
This commit is contained in:
parent
22bc4876e5
commit
1972707f88
@ -11,6 +11,12 @@ type BBBaseType = u64;
|
|||||||
#[derive(Copy, Clone, PartialEq, Eq)]
|
#[derive(Copy, Clone, PartialEq, Eq)]
|
||||||
pub struct BitBoard(BitArr!(for BOARD_AREA, in BBBaseType, Lsb0));
|
pub struct BitBoard(BitArr!(for BOARD_AREA, in BBBaseType, Lsb0));
|
||||||
|
|
||||||
|
impl Default for BitBoard {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl BitBoard {
|
impl BitBoard {
|
||||||
pub const fn new() -> Self {
|
pub const fn new() -> Self {
|
||||||
Self(bitarr!(BBBaseType, Lsb0; 0; BOARD_AREA))
|
Self(bitarr!(BBBaseType, Lsb0; 0; BOARD_AREA))
|
||||||
|
|||||||
@ -131,6 +131,12 @@ impl fmt::Debug for Board {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for Board {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Board {
|
impl Board {
|
||||||
/// Create a new empty board
|
/// Create a new empty board
|
||||||
pub const fn new() -> Self {
|
pub const fn new() -> Self {
|
||||||
|
|||||||
@ -92,6 +92,10 @@ impl FutureMoves {
|
|||||||
self.arena.len()
|
self.arena.len()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn is_empty(&self) -> bool {
|
||||||
|
self.len() == 0
|
||||||
|
}
|
||||||
|
|
||||||
/// Generate children for all children of `nodes`
|
/// Generate children for all children of `nodes`
|
||||||
fn extend_layers(&mut self) {
|
fn extend_layers(&mut self) {
|
||||||
let mut next_nodes: Vec<usize> = (0..self.arena.len())
|
let mut next_nodes: Vec<usize> = (0..self.arena.len())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user