pub struct BoardState {
pub side_to_move: PieceColour,
pub last_move: Move,
pub board_hash: u64,
pub position_hash: u64,
/* private fields */
}Fields§
§side_to_move: PieceColour§last_move: Move§board_hash: u64§position_hash: u64Implementations§
Source§impl BoardState
impl BoardState
pub fn new_starting() -> Self
pub fn halfmove_count(&self) -> u32
pub fn move_count(&self) -> u32
pub fn get_pseudo_legal_moves(&self) -> &Vec<Move>
pub fn is_move_legal_position(&self, mv: &Move) -> bool
pub fn lazy_get_legal_moves(&self) -> impl Iterator<Item = &Move>
pub fn next_state_unchecked(&self, mv: &Move) -> Self
pub fn next_state(&self, mv: &Move) -> Result<Self, BoardStateError>
pub fn get_legal_moves(&self) -> Result<&[Move], BoardStateError>
pub fn get_occurences_of_current_position(&self) -> u8
pub fn get_gamestate(&self) -> GameState
pub fn get_pos64(&self) -> &Pos64
Trait Implementations§
Source§impl Clone for BoardState
impl Clone for BoardState
Source§fn clone(&self) -> BoardState
fn clone(&self) -> BoardState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BoardState
impl Debug for BoardState
Source§impl From<&BoardState> for FEN
impl From<&BoardState> for FEN
Source§fn from(board_state: &BoardState) -> Self
fn from(board_state: &BoardState) -> Self
Converts to this type from the input type.
Source§impl From<FEN> for BoardState
impl From<FEN> for BoardState
Source§impl PartialEq for BoardState
impl PartialEq for BoardState
Auto Trait Implementations§
impl Freeze for BoardState
impl RefUnwindSafe for BoardState
impl Send for BoardState
impl Sync for BoardState
impl Unpin for BoardState
impl UnwindSafe for BoardState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more