Struct shakmaty::Chess [−][src]
pub struct Chess { /* fields omitted */ }
A standard Chess position.
Trait Implementations
impl Clone for Chess
[src]
impl Clone for Chess
fn clone(&self) -> Chess
[src]
fn clone(&self) -> Chess
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Chess
[src]
impl Debug for Chess
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for Chess
[src]
impl Default for Chess
impl Setup for Chess
[src]
impl Setup for Chess
fn board(&self) -> &Board
[src]
fn board(&self) -> &Board
fn pockets(&self) -> Option<&Pockets>
[src]
fn pockets(&self) -> Option<&Pockets>
fn turn(&self) -> Color
[src]
fn turn(&self) -> Color
ⓘImportant traits for Bitboardfn castling_rights(&self) -> Bitboard
[src]
fn castling_rights(&self) -> Bitboard
fn ep_square(&self) -> Option<Square>
[src]
fn ep_square(&self) -> Option<Square>
fn remaining_checks(&self) -> Option<&RemainingChecks>
[src]
fn remaining_checks(&self) -> Option<&RemainingChecks>
fn halfmove_clock(&self) -> u32
[src]
fn halfmove_clock(&self) -> u32
fn fullmoves(&self) -> u32
[src]
fn fullmoves(&self) -> u32
ⓘImportant traits for Bitboardfn us(&self) -> Bitboard
[src]
fn us(&self) -> Bitboard
ⓘImportant traits for Bitboardfn our(&self, role: Role) -> Bitboard
[src]
fn our(&self, role: Role) -> Bitboard
ⓘImportant traits for Bitboardfn them(&self) -> Bitboard
[src]
fn them(&self) -> Bitboard
ⓘImportant traits for Bitboardfn their(&self, role: Role) -> Bitboard
[src]
fn their(&self, role: Role) -> Bitboard
impl Position for Chess
[src]
impl Position for Chess
fn play_unchecked(&mut self, m: &Move)
[src]
fn play_unchecked(&mut self, m: &Move)
Plays a move. It is the callers responsibility to ensure the move is legal. Read more
fn from_setup<S: Setup>(setup: &S) -> Result<Chess, PositionError>
[src]
fn from_setup<S: Setup>(setup: &S) -> Result<Chess, PositionError>
Set up a position. Read more
fn castles(&self) -> &Castles
[src]
fn castles(&self) -> &Castles
Castling paths and unmoved rooks.
fn castling_uncovers_rank_attack(&self, rook: Square, king_to: Square) -> bool
[src]
fn castling_uncovers_rank_attack(&self, rook: Square, king_to: Square) -> bool
Tests the rare case where moving the rook to the other side during castling would uncover a rank attack. Read more
fn legal_moves(&self, moves: &mut MoveList)
[src]
fn legal_moves(&self, moves: &mut MoveList)
Collects all legal moves in an existing buffer.
fn castling_moves(&self, side: CastlingSide, moves: &mut MoveList)
[src]
fn castling_moves(&self, side: CastlingSide, moves: &mut MoveList)
Generates legal castling moves.
fn en_passant_moves(&self, moves: &mut MoveList)
[src]
fn en_passant_moves(&self, moves: &mut MoveList)
Generates en passant moves.
fn san_candidates(&self, role: Role, to: Square, moves: &mut MoveList)
[src]
fn san_candidates(&self, role: Role, to: Square, moves: &mut MoveList)
Generates a subset of legal moves: All piece moves and drops of type role
to the square to
, excluding castling moves. Read more
fn is_insufficient_material(&self) -> bool
[src]
fn is_insufficient_material(&self) -> bool
Tests for insufficient winning material.
fn is_variant_end(&self) -> bool
[src]
fn is_variant_end(&self) -> bool
Checks if the game is over due to a special variant end condition. Read more
fn variant_outcome(&self) -> Option<Outcome>
[src]
fn variant_outcome(&self) -> Option<Outcome>
Tests special variant winning, losing and drawing conditions.
fn swap_turn(self) -> Result<Self, PositionError> where
Self: Sized,
[src]
fn swap_turn(self) -> Result<Self, PositionError> where
Self: Sized,
Swap turns. This is sometimes called "playing a null move". Read more
fn legals(&self) -> MoveList
[src]
fn legals(&self) -> MoveList
Generates legal moves.
fn capture_moves(&self, moves: &mut MoveList)
[src]
fn capture_moves(&self, moves: &mut MoveList)
Generates capture moves.
fn is_legal(&self, m: &Move) -> bool
[src]
fn is_legal(&self, m: &Move) -> bool
Tests a move for legality.
fn is_irreversible(&self, m: &Move) -> bool
[src]
fn is_irreversible(&self, m: &Move) -> bool
Tests if a move is irreversible. Read more
ⓘImportant traits for Bitboardfn king_attackers(
&self,
square: Square,
attacker: Color,
occupied: Bitboard
) -> Bitboard
[src]
fn king_attackers(
&self,
square: Square,
attacker: Color,
occupied: Bitboard
) -> Bitboard
Attacks that a king on square
would have to deal with.
fn is_check(&self) -> bool
[src]
fn is_check(&self) -> bool
Tests if the king is in check.
ⓘImportant traits for Bitboardfn checkers(&self) -> Bitboard
[src]
fn checkers(&self) -> Bitboard
Bitboard of pieces giving check.
fn is_checkmate(&self) -> bool
[src]
fn is_checkmate(&self) -> bool
Tests for checkmate.
fn is_stalemate(&self) -> bool
[src]
fn is_stalemate(&self) -> bool
Tests for stalemate.
fn is_game_over(&self) -> bool
[src]
fn is_game_over(&self) -> bool
Tests if the game is over due to checkmate, stalemate, insufficient material or variant end. Read more
fn outcome(&self) -> Option<Outcome>
[src]
fn outcome(&self) -> Option<Outcome>
The outcome of the game, or None
if the game is not over.
fn play(self, m: &Move) -> Result<Self, IllegalMove> where
Self: Sized,
[src]
fn play(self, m: &Move) -> Result<Self, IllegalMove> where
Self: Sized,
Plays a move. Read more