Struct shuuro::position::Position[][src]

pub struct Position {
    pub type_bb: [BitBoard; 7],
    // some fields omitted
}
Expand description

Represents a state of the game

Fields

type_bb: [BitBoard; 7]

Implementations

Creates a new instance of Position with an empty board.

Returns a piece at the given square.

Returns a bitboard containing pieces of the given player.

Returns the number of the given piece in hand.

Returns the side to make a move next.

Returns the number of plies already completed by the current state.

Returns a history of all moves made since the beginning of the game.

Returns all legal moves where piece can be moved.

Returns a BitBoard of all squares at which a piece of the given color is pinned.

Checks if the king with the given color is in check.

Checks if given color is in checkmate.

Makes the given move. Returns Err if the move is invalid or any special condition is met.

Detecting insufficient material.

Undoes the last move.

Returns a list of squares to where the given piece at the given square can move.

Parses the given SFEN string and updates the game state.

Converts the current state into SFEN formatted string.

Hand from shop is recommended to call this function.

Get hand for specific color (in order K..P).

Available squares for selected piece.

Returns true if hand with excluded piece is empty.

Placing piece on square.

Generating random plinths.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.