Struct shakmaty::variant::KingOfTheHill [−][src]
pub struct KingOfTheHill { /* fields omitted */ }
variant
only.Expand description
A King of the Hill position.
Trait Implementations
Returns the “default value” for a type. Read more
Performs the conversion.
fn from_setup(
setup: &dyn Setup,
mode: CastlingMode
) -> Result<KingOfTheHill, PositionError<KingOfTheHill>>
fn from_setup(
setup: &dyn Setup,
mode: CastlingMode
) -> Result<KingOfTheHill, PositionError<KingOfTheHill>>
Set up a position. Read more
Plays a move. It is the callers responsibility to ensure the move is legal. Read more
Collects all legal moves in an existing buffer.
Generates legal castling moves.
Generates en passant moves.
Generates a subset of legal moves: All piece moves and drops of type
role
to the square to
, excluding castling moves. Read more
Tests if a side has insufficient winning material. Read more
Checks if the game is over due to a special variant end condition. Read more
Tests special variant winning, losing and drawing conditions.
Generates capture moves.
Generate promotion moves.
Tests if a move is irreversible. Read more
Attacks that a king on square
would have to deal with.
Swap turns. This is sometimes called “playing a null move”. Read more
Tests for checkmate.
Tests for stalemate.
Tests if both sides have insufficient winning material. Read more
Tests if the game is over due to checkmate, stalemate, insufficient material or variant end. Read more
Castling rights in terms of corresponding rook positions. Read more
En passant target square on the third or sixth rank. Read more
Remaining checks in chess variants like Three-Check.
Number of half-moves since the last capture or pawn move. Read more
Current move number. Read more
Squares occupied by a given piece type of the side to move. Read more
Computes the Zobrist hash from scratch.
fn prepare_incremental_zobrist_hash<V: ZobristValue>(
&self,
_previous: V,
_m: &Move
) -> Option<V>
fn prepare_incremental_zobrist_hash<V: ZobristValue>(
&self,
_previous: V,
_m: &Move
) -> Option<V>
Prepares an incremental update of the Zobrist hash before playing move
m
in self
. Returns a new intermediate Zobrist hash, or None
if incremental updating is not supported. Read more
fn finalize_incremental_zobrist_hash<V: ZobristValue>(
&self,
_intermediate: V,
_m: &Move
) -> Option<V>
fn finalize_incremental_zobrist_hash<V: ZobristValue>(
&self,
_intermediate: V,
_m: &Move
) -> Option<V>
Finalizes an incremental update of the Zobrist hash after playing move
m
in self
. Returns the new Zobrist hash, or None
if incremental
updating is not supported. Read more
Auto Trait Implementations
impl RefUnwindSafe for KingOfTheHill
impl Send for KingOfTheHill
impl Sync for KingOfTheHill
impl Unpin for KingOfTheHill
impl UnwindSafe for KingOfTheHill
Blanket Implementations
Mutably borrows from an owned value. Read more