Struct poirebot::game::BoardSide[][src]

pub struct BoardSide {
    pub color: Color,
    pub pawns: BitBoard,
    pub rooks: BitBoard,
    pub knights: BitBoard,
    pub bishops: BitBoard,
    pub queens: BitBoard,
    pub king: BitBoard,
    pub unmoved_rooks: BitBoard,
    pub en_passant_target: BitBoard,
    pub pieces: BitBoard,
    pub attacks: BitBoard,
    pub king_has_moved: bool,
}

Fields

color: Colorpawns: BitBoard

Where all this side’s pawns are.

rooks: BitBoard

Where all this side’s rooks are.

knights: BitBoard

Where all this side’s knights are.

bishops: BitBoard

Where all this side’s bishops are.

queens: BitBoard

Where all this side’s queens are.

king: BitBoard

Where this side’s king is.

unmoved_rooks: BitBoard

Rooks that haven’t moved.

en_passant_target: BitBoard

En-passant target square. This is the ‘vulnerable’ square for this side, i.e. behind the pawn that just did a 2-step.

pieces: BitBoard

Inherited; Where all this side’s pieces are.

attacks: BitBoard

Inherited; squares attacked by this side’s pieces.

king_has_moved: bool

Whether the king has already moved.

Implementations

impl BoardSide[src]

pub fn get_piece(&self, position: Position) -> Option<Pieces>[src]

Get the piece at the given position if any.

pub fn flip(&self) -> Self[src]

Return a new instance for the other side.

pub fn new<F: FnOnce(&mut Self)>(color: Color, f: F) -> Self[src]

Initialize a new side (empty at first) and then refresh inherited properties.

pub fn mutate<F: FnOnce(&mut Self)>(&mut self, f: F)[src]

Mutates and then refresh inherited properties.

Trait Implementations

impl Clone for BoardSide[src]

impl Copy for BoardSide[src]

impl Debug for BoardSide[src]

impl Eq for BoardSide[src]

impl PartialEq<BoardSide> for BoardSide[src]

impl StructuralEq for BoardSide[src]

impl StructuralPartialEq for BoardSide[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,