Struct chess_move_gen::Board
[−]
[src]
pub struct Board { /* fields omitted */ }
Board encodes all positional information and non-positional game state
Methods
impl Board
[src]
fn make(&mut self, mv: Move) -> Option<(Piece, Square)>
Returns piece captured and square if any
fn unmake(&mut self,
mv: Move,
capture: Option<(Piece, Square)>,
original_state: &State,
original_hash_key: u64)
mv: Move,
capture: Option<(Piece, Square)>,
original_state: &State,
original_hash_key: u64)
impl Board
[src]
fn new(grid: [Option<Piece>; 64], state: State) -> Board
fn from_fen(fen: &str) -> Result<Board, String>
Construct a new board from a FEN string
fn to_fen(&self) -> String
fn hash_key(&self) -> u64
fn state(&self) -> &State
Get board non-positional state
fn grid(&self) -> &[Option<Piece>; 64]
Get board position
fn at(&self, sq: Square) -> Option<Piece>
Get piece at square
fn to_string(&self) -> String
fn bb_side(&self, side: Side) -> BB
Get bitboard of pieces for a particular side
fn bb_pc(&self, pc: Piece) -> BB
Get bitboard of pieces for a particular piece
fn bb_sliders(&self, side: Side) -> (BB, BB)
Get bitboard of sliding pieces for a particular side
fn bb_occupied(&self) -> BB
Get bitboard of all occupied squares
fn bb_empty(&self) -> BB
Get bitboard of all empty squares
Trait Implementations
impl Clone for Board
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more