Struct shakmaty::variant::RacingKings
source · pub struct RacingKings { /* private fields */ }
Available on crate feature
variant
only.Expand description
A Racing Kings position.
Implementations§
source§impl RacingKings
impl RacingKings
pub const fn new() -> RacingKings
Trait Implementations§
source§impl Clone for RacingKings
impl Clone for RacingKings
source§fn clone(&self) -> RacingKings
fn clone(&self) -> RacingKings
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RacingKings
impl Debug for RacingKings
source§impl Default for RacingKings
impl Default for RacingKings
source§fn default() -> RacingKings
fn default() -> RacingKings
Returns the “default value” for a type. Read more
source§impl From<RacingKings> for VariantPosition
impl From<RacingKings> for VariantPosition
source§fn from(pos: RacingKings) -> VariantPosition
fn from(pos: RacingKings) -> VariantPosition
Converts to this type from the input type.
source§impl FromSetup for RacingKings
impl FromSetup for RacingKings
source§fn from_setup(
setup: Setup,
mode: CastlingMode
) -> Result<RacingKings, PositionError<RacingKings>>
fn from_setup( setup: Setup, mode: CastlingMode ) -> Result<RacingKings, PositionError<RacingKings>>
source§impl Hash for RacingKings
impl Hash for RacingKings
source§impl PartialEq for RacingKings
impl PartialEq for RacingKings
source§impl Position for RacingKings
impl Position for RacingKings
source§fn promoted(&self) -> Bitboard
fn promoted(&self) -> Bitboard
Positions of tracked promoted pieces. Used only for Crazyhouse.
source§fn maybe_ep_square(&self) -> Option<Square>
fn maybe_ep_square(&self) -> Option<Square>
Unconditionally gets the en passant target
square after a double pawn push, even if no en passant capture is
actually possible. Read more
source§fn remaining_checks(&self) -> Option<&ByColor<RemainingChecks>>
fn remaining_checks(&self) -> Option<&ByColor<RemainingChecks>>
Remaining checks in Three-Check.
source§fn halfmoves(&self) -> u32
fn halfmoves(&self) -> u32
Number of half-moves since the last
capture or pawn move.
source§fn fullmoves(&self) -> NonZeroU32
fn fullmoves(&self) -> NonZeroU32
Move number. Starts at 1 and is increased after every black move.
source§fn into_setup(self, _mode: EnPassantMode) -> Setup
fn into_setup(self, _mode: EnPassantMode) -> Setup
Converts the position to the current
Setup
.source§fn 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
source§fn legal_moves(&self) -> MoveList
fn legal_moves(&self) -> MoveList
Generates all legal moves.
source§fn 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
source§fn 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
source§fn variant_outcome(&self) -> Option<Outcome>
fn variant_outcome(&self) -> Option<Outcome>
Tests special variant winning, losing and drawing conditions.
source§fn san_candidates(&self, role: Role, to: Square) -> MoveList
fn san_candidates(&self, role: Role, to: Square) -> MoveList
Generates a subset of legal moves: All piece moves and drops of type
role
to the square to
, excluding castling moves.source§fn castling_moves(&self, side: CastlingSide) -> MoveList
fn castling_moves(&self, side: CastlingSide) -> MoveList
Generates legal castling moves.
source§fn en_passant_moves(&self) -> MoveList
fn en_passant_moves(&self) -> MoveList
Generates en passant moves.
source§fn capture_moves(&self) -> MoveList
fn capture_moves(&self) -> MoveList
Generates capture moves.
source§fn promotion_moves(&self) -> MoveList
fn promotion_moves(&self) -> MoveList
Generate promotion moves.
source§fn 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.source§fn our(&self, role: Role) -> Bitboard
fn our(&self, role: Role) -> Bitboard
Squares occupied with the given piece type by the side to move.
source§fn their(&self, role: Role) -> Bitboard
fn their(&self, role: Role) -> Bitboard
Squares occupied with the given piece type by the opponent of the side
to move.
source§fn pseudo_legal_ep_square(&self) -> Option<Square>
fn pseudo_legal_ep_square(&self) -> Option<Square>
The en passant square, if it is the target of a
pseudo-legal en passant move.
source§fn legal_ep_square(&self) -> Option<Square>
fn legal_ep_square(&self) -> Option<Square>
The en passant square, if it really is the target of a
legal en passant
move.
source§fn is_checkmate(&self) -> bool
fn is_checkmate(&self) -> bool
Tests for checkmate.
source§fn is_stalemate(&self) -> bool
fn is_stalemate(&self) -> bool
Tests for stalemate.
source§fn is_insufficient_material(&self) -> bool
fn is_insufficient_material(&self) -> bool
Tests if both sides
have insufficient winning material.
source§fn is_game_over(&self) -> bool
fn is_game_over(&self) -> bool
source§fn outcome(&self) -> Option<Outcome>
fn outcome(&self) -> Option<Outcome>
The outcome of the game, or
None
if the game is not over.impl Eq for RacingKings
Auto Trait Implementations§
impl Freeze for RacingKings
impl RefUnwindSafe for RacingKings
impl Send for RacingKings
impl Sync for RacingKings
impl Unpin for RacingKings
impl UnwindSafe for RacingKings
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<P> ZobristHash for Pwhere
P: Position,
impl<P> ZobristHash for Pwhere
P: Position,
source§fn zobrist_hash<V>(&self, mode: EnPassantMode) -> Vwhere
V: ZobristValue,
fn zobrist_hash<V>(&self, mode: EnPassantMode) -> Vwhere
V: ZobristValue,
Computes the Zobrist hash of the position from scratch. The hash
includes the position, except halfmove clock and fullmove number.