[][src]Struct shakmaty::Chess

pub struct Chess { /* fields omitted */ }

A standard Chess position.

Trait Implementations

impl FromSetup for Chess[src]

impl Position for Chess[src]

fn swap_turn(self) -> Result<Self, PositionError> where
    Self: Sized + FromSetup
[src]

Swap turns. This is sometimes called "playing a null move". Read more

fn legals(&self) -> MoveList[src]

Generates legal moves.

fn capture_moves(&self, moves: &mut MoveList)[src]

Generates capture moves.

Tests a move for legality.

fn is_irreversible(&self, m: &Move) -> bool[src]

Tests if a move is irreversible. Read more

fn king_attackers(
    &self,
    square: Square,
    attacker: Color,
    occupied: Bitboard
) -> Bitboard
[src]

Attacks that a king on square would have to deal with.

fn is_check(&self) -> bool[src]

Tests if the king is in check.

fn checkers(&self) -> Bitboard[src]

Bitboard of pieces giving check.

fn is_checkmate(&self) -> bool[src]

Tests for checkmate.

fn is_stalemate(&self) -> bool[src]

Tests for stalemate.

fn is_insufficient_material(&self) -> bool[src]

Tests if both sides have insufficient winning material. Read more

fn is_game_over(&self) -> bool[src]

Tests if the game is over due to checkmate, stalemate, insufficient material or variant end. Read more

fn outcome(&self) -> Option<Outcome>[src]

The outcome of the game, or None if the game is not over.

fn play(self, m: &Move) -> Result<Self, IllegalMoveError> where
    Self: Sized
[src]

Plays a move. Read more

impl Setup for Chess[src]

fn us(&self) -> Bitboard[src]

Squares occupied by the side to move. Read more

fn our(&self, role: Role) -> Bitboard[src]

Squares occupied by a given piece type of the side to move. Read more

fn them(&self) -> Bitboard[src]

Squares occupied by the waiting player. Read more

fn their(&self, role: Role) -> Bitboard[src]

Squares occupied by a given piece type of the waiting player. Read more

impl From<Chess> for VariantPosition[src]

impl Default for Chess[src]

impl Clone for Chess[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Chess[src]

Auto Trait Implementations

impl Send for Chess

impl Unpin for Chess

impl Sync for Chess

impl UnwindSafe for Chess

impl RefUnwindSafe for Chess

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]