[]Enum myopic_brain::Side

pub enum Side {
    White,
    Black,
}

Represents the two different teams in a game of chess.

Variants

White
Black

Implementations

impl Side

pub fn pawn_dir(self) -> Dir

Get the vertical direction in which a pawn on this side moves (north or south).

pub fn pawn_first_rank(self) -> BitBoard

Get the rank on which a pawn on this side starts the game.

pub fn pawn_third_rank(self) -> BitBoard

Get the rank to which a pawn on this side moves to following it's special two rank first move.

pub fn pawn_promoting_src_rank(self) -> BitBoard

Get the rank a pawn on this side must be on for it to be able to promote on it's next move.

pub fn pawn_promoting_dest_rank(self) -> BitBoard

The rank a pawn on this side will end up on after promoting to another piece.

Trait Implementations

impl Clone for Side

impl Copy for Side

impl Debug for Side

impl Eq for Side

impl PartialEq<Side> for Side

impl PartialOrd<Side> for Side

impl Reflectable for Side

impl StructuralEq for Side

impl StructuralPartialEq for Side

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