[−][src]Struct chess_engine::Board
Implementations
impl Board[src]
pub fn horde() -> Self[src]
Create the default board for the Horde variant
pub fn empty() -> Self[src]
pub fn rating_bar(&self, len: usize) -> String[src]
pub fn get_turn_color(&self) -> Color[src]
Get the color of the current player
pub fn get_en_passant(&self) -> Option<Position>[src]
Get the position of the En-Passant square
pub fn remove_all(&self, color: Color) -> Self[src]
Remove all of the pieces for a given player
pub fn queen_all(&self, color: Color) -> Self[src]
Convert all of a given players pieces to queens
pub fn set_turn(&self, color: Color) -> Self[src]
Make the game a certain player's turn
pub fn get_material_advantage(&self, color: Color) -> i32[src]
Get the value of the material advantage of a certain player
pub fn get_piece(&self, pos: Position) -> Option<Piece>[src]
Does a square have any piece?
pub fn has_ally_piece(&self, pos: Position, ally_color: Color) -> bool[src]
Does a square have an ally piece?
pub fn has_enemy_piece(&self, pos: Position, ally_color: Color) -> bool[src]
If a square at a given position has an enemy piece from a given ally color, return true. Otherwise, return false.
For example, if a square has a black piece, and this method is called
upon it with an ally_color of Color::White, then it will return true.
If called with Color::Black upon the same square, however, it will return false.
pub fn has_piece(&self, pos: Position) -> bool[src]
If a square at a given position has any piece, return true. Otherwise, return false.
pub fn has_no_piece(&self, pos: Position) -> bool[src]
If a square at a given position has no piece, return true. Otherwise, return false.
pub fn get_king_pos(&self, color: Color) -> Option<Position>[src]
If there is a king on the board, return the position that it sits on.
pub fn is_threatened(&self, pos: Position, ally_color: Color) -> bool[src]
Is a square threatened by an enemy piece?
pub fn is_in_check(&self, color: Color) -> bool[src]
Get whether or not the king of a given color is in check.
pub fn can_kingside_castle(&self, color: Color) -> bool[src]
Can a given player castle kingside?
pub fn can_queenside_castle(&self, color: Color) -> bool[src]
Can a given player castle queenside?
pub fn has_sufficient_material(&self, color: Color) -> bool[src]
Does the respective player have sufficient material?
pub fn has_insufficient_material(&self, color: Color) -> bool[src]
Does the respective player have insufficient material?
pub fn is_stalemate(&self) -> bool[src]
Is the current player in stalemate?
pub fn is_checkmate(&self) -> bool[src]
Is the current player in checkmate?
pub fn change_turn(mut self: Self) -> Self[src]
Change the current turn to the next player.
pub fn play_move(&self, m: Move) -> GameResult[src]
Play a move and confirm it is legal.
Trait Implementations
impl Clone for Board[src]
fn clone(&self) -> Board[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for Board[src]
impl Debug for Board[src]
impl Default for Board[src]
impl Display for Board[src]
impl Eq for Board[src]
impl Evaluate for Board[src]
fn value_for(&self, ally_color: Color) -> f64[src]
fn get_current_player_color(&self) -> Color[src]
fn apply_eval_move(&self, m: Move) -> Self[src]
fn get_legal_moves(&self) -> Vec<Move>[src]
fn get_best_next_move(&self, depth: i32) -> (Move, u64, f64)[src]
fn get_worst_next_move(&self, depth: i32) -> (Move, u64, f64)[src]
fn minimax(
&self,
depth: i32,
mut alpha: f64,
mut beta: f64,
is_maximizing: bool,
getting_move_for: Color,
board_count: &mut u64
) -> f64[src]
&self,
depth: i32,
mut alpha: f64,
mut beta: f64,
is_maximizing: bool,
getting_move_for: Color,
board_count: &mut u64
) -> f64
impl From<Board> for BoardBuilder[src]
impl Ord for Board[src]
fn cmp(&self, other: &Board) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self1.50.0[src]
impl PartialEq<Board> for Board[src]
impl PartialOrd<Board> for Board[src]
fn partial_cmp(&self, other: &Board) -> Option<Ordering>[src]
fn lt(&self, other: &Board) -> bool[src]
fn le(&self, other: &Board) -> bool[src]
fn gt(&self, other: &Board) -> bool[src]
fn ge(&self, other: &Board) -> bool[src]
impl StructuralEq for Board[src]
impl StructuralPartialEq for Board[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,