pub trait BitboardTrait {
// Required methods
fn pretty_print_string(&self) -> String;
fn pop_bitboard(&mut self) -> (Bitboard, bool);
fn pop_square(&mut self) -> (Square, bool);
fn variation_count(self) -> usize;
}
Expand description
Bitboard trait adds functions to an u64 that allow treating it as a chess engine bitboard
Required Methods§
Sourcefn pretty_print_string(&self) -> String
fn pretty_print_string(&self) -> String
returns a string that represents the bitboard as pretty print string
Sourcefn pop_bitboard(&mut self) -> (Bitboard, bool)
fn pop_bitboard(&mut self) -> (Bitboard, bool)
pops a bitboard with only one bit set from the bitboard and returns it together with a bool indicating whether the pop was succesful
Sourcefn pop_square(&mut self) -> (Square, bool)
fn pop_square(&mut self) -> (Square, bool)
pops a square from the bitboard and returns it together with a bool indicating whether the pop was succesful
Sourcefn variation_count(self) -> usize
fn variation_count(self) -> usize
returns the number of ways the 1 bits in the bitboard can be set to either 1 or 0
Implementors§
impl BitboardTrait for Bitboard
BitboardTrait adds methods to Bitboard