pub struct Board { /* private fields */ }
Implementations§
source§impl Board
impl Board
pub fn new() -> Self
pub fn set_fen(&mut self, fen: &str) -> Result<()>
pub fn from_fen(fen: &str) -> Result<Self>
pub fn get_sub_board(&self) -> &SubBoard
pub fn get_evaluator(&self) -> &Evaluator
pub fn get_evaluator_mut(&mut self) -> &mut Evaluator
pub fn is_good_fen(fen: &str) -> bool
pub fn reset(&mut self)
pub fn clear(&mut self)
pub fn flip_vertical(&mut self)
pub fn flip_vertical_and_flip_turn(&mut self)
pub fn flip_horizontal(&mut self)
pub fn to_board_string(&self, use_unicode: bool) -> String
pub fn to_unicode_string(&self) -> String
pub fn result(&self) -> GameResult
pub fn get_num_moves(&self) -> NumMoves
pub fn get_num_repetitions(&self) -> u8
pub fn is_repetition(&self, n_times: usize) -> bool
pub fn is_threefold_repetition(&self) -> bool
pub fn is_other_draw(&self) -> bool
pub fn is_draw(&self) -> bool
pub fn is_game_over(&self) -> bool
pub fn pop(&mut self) -> ValidOrNullMove
pub fn get_all_moves(&self) -> Vec<ValidOrNullMove>
pub fn get_last_move(&self) -> Option<ValidOrNullMove>
pub fn contains_null_move(&self) -> bool
pub fn get_ply(&self) -> usize
pub fn has_empty_stack(&self) -> bool
pub fn push_san(&mut self, san: &str) -> Result<ValidOrNullMove>
pub fn push_sans(&mut self, sans: &str) -> Result<Vec<ValidOrNullMove>>
pub fn push_uci(&mut self, uci: &str) -> Result<ValidOrNullMove>
pub fn push_str(&mut self, s: &str)
pub fn push_uci_moves( &mut self, uci_moves: &str, ) -> Result<Vec<ValidOrNullMove>>
pub fn algebraic_and_push( &mut self, valid_or_null_move: ValidOrNullMove, long: bool, ) -> Result<String>
pub fn san_and_push( &mut self, valid_or_null_move: ValidOrNullMove, ) -> Result<String>
pub fn lan_and_push( &mut self, valid_or_null_move: ValidOrNullMove, ) -> Result<String>
pub fn variation_san(board: &Board, variation: Vec<ValidOrNullMove>) -> String
pub fn get_pgn(&self) -> String
pub fn perft(&mut self, depth: Depth) -> usize
pub fn evaluate(&mut self) -> Score
pub fn evaluate_flipped(&mut self) -> Score
Methods from Deref<Target = SubBoard>§
pub fn transposition_key_components( &self, ) -> ([BitBoard; 6], [BitBoard; 2], Color, [CastleRights; 2], Option<Square>)
pub fn status(&self) -> BoardStatus
pub fn occupied(&self) -> BitBoard ⓘ
pub fn get_num_pieces(&self) -> u32
pub fn occupied_co(&self, color: Color) -> BitBoard ⓘ
pub fn get_black_occupied(&self) -> BitBoard ⓘ
pub fn get_white_occupied(&self) -> BitBoard ⓘ
pub fn get_king_square(&self, color: Color) -> Square
pub fn get_piece_masks(&self) -> &[BitBoard]
pub fn get_piece_mask(&self, piece_type: PieceType) -> BitBoard ⓘ
pub fn has_insufficient_material(&self, color: Color) -> bool
pub fn has_non_pawn_material(&self) -> bool
pub fn get_non_king_pieces_mask(&self) -> BitBoard ⓘ
pub fn has_only_same_colored_bishop(&self) -> bool
pub fn is_insufficient_material(&self) -> bool
pub fn castle_rights(&self, color: Color) -> CastleRights
pub fn clean_castling_rights(&self) -> BitBoard ⓘ
pub fn turn(&self) -> Color
pub fn my_castle_rights(&self) -> CastleRights
pub fn their_castle_rights(&self) -> CastleRights
pub fn get_white_material_score(&self) -> Score
pub fn get_black_material_score(&self) -> Score
pub fn gives_check(&self, move_: Move) -> bool
pub fn gives_checkmate(&self, move_: Move) -> bool
pub fn null_move(&self) -> Result<Self>
pub fn is_sane(&self) -> bool
pub fn get_hash(&self) -> u64
pub fn get_pawn_hash(&self) -> u64
pub fn piece_type_at(&self, square: Square) -> Option<PieceType>
pub fn color_at(&self, square: Square) -> Option<Color>
pub fn piece_at(&self, square: Square) -> Option<Piece>
pub fn ep_square(&self) -> Option<Square>
pub fn get_halfmove_clock(&self) -> u8
pub fn get_fullmove_number(&self) -> NumMoves
pub fn get_fen(&self) -> String
pub fn is_en_passant(&self, move_: Move) -> bool
pub fn is_passed_pawn(&self, square: Square) -> bool
pub fn is_capture(&self, move_: Move) -> bool
pub fn generate_masked_legal_moves( &self, from_bitboard: BitBoard, to_bitboard: BitBoard, ) -> MoveGenerator ⓘ
pub fn generate_legal_moves(&self) -> MoveGenerator ⓘ
pub fn generate_legal_captures(&self) -> MoveGenerator ⓘ
pub fn is_legal(&self, move_: Move) -> bool
pub fn is_castling(&self, move_: Move) -> bool
pub fn is_zeroing(&self, move_: Move) -> bool
pub fn pinned(&self) -> BitBoard ⓘ
pub fn get_checkers(&self) -> BitBoard ⓘ
pub fn is_check(&self) -> bool
pub fn is_checkmate(&self) -> bool
pub fn piece_symbol_at(&self, square: Square) -> String
pub fn piece_unicode_symbol_at( &self, square: Square, flip_color: bool, ) -> String
pub fn to_board_string( &self, last_move: ValidOrNullMove, use_unicode: bool, ) -> String
pub fn to_unicode_string(&self, last_move: ValidOrNullMove) -> String
pub fn is_fifty_moves(&self) -> bool
pub fn is_stalemate(&self) -> bool
pub fn is_double_pawn_push(&self, move_: Move) -> bool
pub fn is_quiet(&self, move_: Move) -> bool
pub fn has_legal_en_passant(&self) -> bool
pub fn reduces_castling_rights(&self, move_: Move) -> bool
pub fn is_irreversible(&self, move_: Move) -> bool
pub fn is_endgame(&self) -> bool
pub fn parse_move(&self, move_text: &str) -> Result<ValidOrNullMove>
pub fn score_flipped(&self, score: Score) -> Score
pub fn get_material_score(&self) -> Score
pub fn get_winning_side(&self) -> Option<Color>
pub fn get_material_score_flipped(&self) -> Score
pub fn get_masked_material_score_abs(&self, mask: BitBoard) -> Score
pub fn get_material_score_abs(&self) -> Score
pub fn get_non_pawn_material_score_abs(&self) -> Score
pub fn slow_evaluate(&self) -> Score
pub fn slow_evaluate_flipped(&self) -> Score
pub fn custom_iter<'a>( &'a self, piece_types: &'a [PieceType], colors: &'a [Color], mask: BitBoard, ) -> impl Iterator<Item = (Piece, Square)> + 'a
pub fn iter(&self) -> impl Iterator<Item = (Piece, Square)> + '_
Trait Implementations§
source§impl BoardMethodOverload<Move> for Board
impl BoardMethodOverload<Move> for Board
source§impl BoardMethodOverload<ValidOrNullMove> for Board
impl BoardMethodOverload<ValidOrNullMove> for Board
fn push_unchecked(&mut self, valid_or_null_move: ValidOrNullMove)
fn push(&mut self, valid_or_null_move: ValidOrNullMove) -> Result<()>
fn gives_repetition(&self, valid_or_null_move: ValidOrNullMove) -> bool
fn gives_threefold_repetition( &self, valid_or_null_move: ValidOrNullMove, ) -> bool
fn gives_claimable_threefold_repetition( &self, valid_or_null_move: ValidOrNullMove, ) -> bool
Auto Trait Implementations§
impl Freeze for Board
impl RefUnwindSafe for Board
impl Send for Board
impl Sync for Board
impl Unpin for Board
impl UnwindSafe for Board
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CustomColorize for Twhere
T: ToString,
impl<T> CustomColorize for Twhere
T: ToString,
fn colorize( &self, style_functions: &[fn(_: ColoredString) -> ColoredString], ) -> String
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more