Struct shakmaty::variants::RacingKings
source · pub struct RacingKings { /* private fields */ }
Expand description
A Racing Kings position.
Trait Implementations
sourceimpl Clone for RacingKings
impl Clone for RacingKings
sourcefn clone(&self) -> RacingKings
fn clone(&self) -> RacingKings
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for RacingKings
impl Debug for RacingKings
sourceimpl Default for RacingKings
impl Default for RacingKings
sourcefn default() -> RacingKings
fn default() -> RacingKings
Returns the “default value” for a type. Read more
sourceimpl Position for RacingKings
impl Position for RacingKings
sourcefn play_unchecked(&mut self, m: &Move)
fn play_unchecked(&mut self, m: &Move)
Plays a move. It is the callers responsibility to ensure the move is
legal. Read more
sourcefn from_setup<S: Setup>(setup: &S) -> Result<RacingKings, PositionError>
fn from_setup<S: Setup>(setup: &S) -> Result<RacingKings, PositionError>
Set up a position. Read more
sourcefn legal_moves(&self, moves: &mut MoveList)
fn legal_moves(&self, moves: &mut MoveList)
Collects all legal moves in an existing buffer.
sourcefn has_insufficient_material(&self, _color: Color) -> bool
fn has_insufficient_material(&self, _color: Color) -> bool
Tests if a side has insufficient winning material. Read more
sourcefn is_variant_end(&self) -> bool
fn is_variant_end(&self) -> bool
Checks if the game is over due to a special variant end condition. Read more
sourcefn variant_outcome(&self) -> Option<Outcome>
fn variant_outcome(&self) -> Option<Outcome>
Tests special variant winning, losing and drawing conditions.
sourcefn swap_turn(self) -> Result<Self, PositionError>where
Self: Sized,
fn swap_turn(self) -> Result<Self, PositionError>where
Self: Sized,
Swap turns. This is sometimes called “playing a null move”. Read more
sourcefn san_candidates(&self, role: Role, to: Square, moves: &mut MoveList)
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 moresourcefn castling_moves(&self, side: CastlingSide, moves: &mut MoveList)
fn castling_moves(&self, side: CastlingSide, moves: &mut MoveList)
Generates legal castling moves.
sourcefn en_passant_moves(&self, moves: &mut MoveList)
fn en_passant_moves(&self, moves: &mut MoveList)
Generates en passant moves.
sourcefn capture_moves(&self, moves: &mut MoveList)
fn capture_moves(&self, moves: &mut MoveList)
Generates capture moves.
sourcefn is_irreversible(&self, m: &Move) -> bool
fn is_irreversible(&self, m: &Move) -> bool
Tests if a move is irreversible. Read more
sourcefn king_attackers(
&self,
square: Square,
attacker: Color,
occupied: Bitboard
) -> Bitboard
fn king_attackers(
&self,
square: Square,
attacker: Color,
occupied: Bitboard
) -> Bitboard
Attacks that a king on
square
would have to deal with.sourcefn is_checkmate(&self) -> bool
fn is_checkmate(&self) -> bool
Tests for checkmate.
sourcefn is_stalemate(&self) -> bool
fn is_stalemate(&self) -> bool
Tests for stalemate.
sourcefn is_insufficient_material(&self) -> bool
fn is_insufficient_material(&self) -> bool
Tests if both sides
have insufficient winning material. Read more
sourcefn is_game_over(&self) -> bool
fn is_game_over(&self) -> bool
Tests if the game is over due to checkmate,
stalemate,
insufficient material or
variant end. Read more
sourceimpl Setup for RacingKings
impl Setup for RacingKings
sourcefn castling_rights(&self) -> Bitboard
fn castling_rights(&self) -> Bitboard
Castling rights in terms of corresponding rook positions. Read more
sourcefn remaining_checks(&self) -> Option<&RemainingChecks>
fn remaining_checks(&self) -> Option<&RemainingChecks>
Remaining checks in chess variants like Three-Check.
sourcefn halfmoves(&self) -> u32
fn halfmoves(&self) -> u32
Number of half-moves since the last
capture or pawn move. Read more
Auto Trait Implementations
impl RefUnwindSafe for RacingKings
impl Send for RacingKings
impl Sync for RacingKings
impl Unpin for RacingKings
impl UnwindSafe for RacingKings
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more