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

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

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.

c is color that is supposed to win

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

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

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

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.

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.