Struct poirebot::game::Board[][src]

pub struct Board {
    pub white: BoardSide,
    pub black: BoardSide,
}

Fields

white: BoardSide

The Color::White board side.

black: BoardSide

The Color::Black board side.

Implementations

impl Board[src]

pub fn from_fen(fen: &str) -> Result<Self>[src]

Convert a Forsyth–Edwards Notation (FEN) string to Board

pub fn to_fen(&self) -> String[src]

Convert a Board to Forsyth–Edwards Notation (FEN) string

impl Board[src]

pub fn apply_move(&mut self, m: Move)[src]

Update the board after a player moved.

pub fn get_pawns(&self, color: Color) -> Vec<Pieces>[src]

Get a list of pawns of the given color.

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

Get the piece at the given position if any.

pub fn get_piece_value(&self, position: Position) -> u8[src]

Get the piece at the given position if any.

pub fn get_bitboard(&self) -> BitBoard

Notable traits for BitBoard

impl Iterator for BitBoard type Item = Position;
[src]

Returns a bitboard for all the pieces in the board.

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

Mutates and then refresh inherited properties.

pub fn get_side(&self, color: Color) -> &BoardSide[src]

pub fn get_side_mut(&mut self, color: Color) -> &mut BoardSide[src]

pub fn draw_ascii(&self, side: Color) -> String[src]

Draws the board as an 8x8 ASCII string

Trait Implementations

impl Clone for Board[src]

impl Copy for Board[src]

impl Debug for Board[src]

impl Default for Board[src]

impl Eq for Board[src]

impl PartialEq<Board> for Board[src]

impl StructuralEq for Board[src]

impl StructuralPartialEq for Board[src]

Auto Trait Implementations

impl RefUnwindSafe for Board

impl Send for Board

impl Sync for Board

impl Unpin for Board

impl UnwindSafe for Board

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>,