Trait BitboardTrait

Source
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§

Source

fn pretty_print_string(&self) -> String

returns a string that represents the bitboard as pretty print string

Source

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

Source

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

Source

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§

Source§

impl BitboardTrait for Bitboard

BitboardTrait adds methods to Bitboard