pub enum Color {
Black,
White,
}
Expand description
White
or Black
.
Variants§
Implementations§
source§impl Color
impl Color
pub const fn from_char(ch: char) -> Option<Color>
pub fn char(self) -> char
pub const fn from_white(white: bool) -> Color
pub const fn from_black(black: bool) -> Color
pub fn fold_wb<T>(self, white: T, black: T) -> T
pub const fn is_white(self) -> bool
pub const fn is_black(self) -> bool
pub const fn backrank(self) -> Rank
pub fn relative_rank(self, rank: Rank) -> Rank
pub const fn pawn(self) -> Piece
pub const fn knight(self) -> Piece
pub const fn bishop(self) -> Piece
pub const fn rook(self) -> Piece
pub const fn queen(self) -> Piece
pub const fn king(self) -> Piece
Trait Implementations§
impl Copy for Color
impl Eq for Color
impl IsEnabled for Color
Available on crate feature
nohash-hasher
only.