Struct pleco::board::BoardState
[−]
[src]
pub struct BoardState { pub castling: Castling, pub rule_50: i16, pub ply: u16, pub ep_square: SQ, pub zobrast: u64, pub captured_piece: Option<Piece>, pub checkers_bb: BitBoard, pub blockers_king: [BitBoard; 2], pub pinners_king: [BitBoard; 2], pub check_sqs: [BitBoard; 6], pub prev_move: BitMove, pub prev: Option<Arc<BoardState>>, }
Holds useful information concerning the current state of the board.
This is information that is computed upon making a move, and requires expensive computation to do so as well.
It is stored in the Heap by 'Board' as an Arc
Allows for easy undo-ing of moves as these keep track of their previous board state, forming a Tree-like persistent Stack
Fields
castling: Castling
rule_50: i16
ply: u16
ep_square: SQ
zobrast: u64
captured_piece: Option<Piece>
checkers_bb: BitBoard
blockers_king: [BitBoard; 2]
pinners_king: [BitBoard; 2]
check_sqs: [BitBoard; 6]
prev_move: BitMove
prev: Option<Arc<BoardState>>
Methods
impl BoardState
[src]
fn default() -> BoardState
[src]
Constructs a board state for the starting position.
fn blank() -> BoardState
[src]
Constructs a blank board state.
fn partial_clone(&self) -> BoardState
[src]
Constructs a partial clone of a BoardState.
Castling, rule_50, ply, and ep_square are copied. The copied fields need to be modified accordingly, and the remaining fields need to be generated.
fn get_prev(&self) -> Option<Arc<BoardState>>
[src]
Return the previous BoardState from one move ago.
fn backtrace(&self)
[src]
fn print_info(&self)
[src]
Trait Implementations
impl Clone for BoardState
[src]
fn clone(&self) -> BoardState
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more