Enum chess::Color[][src]

pub enum Color {
    White,
    Black,
}

Represent a color.

Variants

Methods

impl Color
[src]

Convert the Color to a usize for table lookups.

Covert the Color to a rank, which reperesnts the starting position for that colors pieces.

Convert a Color to my opponents backrank, which represents the starting position for the opponents pieces.

Convert a Color to my second rank, which represents the starting position for my pawns.

Convert a Color to my seventh rank, which represents the rank before pawn promotion.

Trait Implementations

impl PartialOrd for Color
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialEq for Color
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Copy for Color
[src]

impl Clone for Color
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Color
[src]

Formats the value using the given formatter. Read more

impl Not for Color
[src]

The resulting type after applying the ! operator.

Get the other color.

Auto Trait Implementations

impl Send for Color

impl Sync for Color