pub enum Color {
Black,
White,
}
Expand description
This enum represents the two players. The first player is always Black
.
When displaying boards we use the symbol ● for Black and ○ for White. Note that when using a dark theme, apparent colors might be reversed.
Variants§
Implementations§
Source§impl Color
impl Color
Sourcepub fn opponent_color(&self) -> Self
pub fn opponent_color(&self) -> Self
Return the color of the other player.
Trait Implementations§
impl Copy for Color
impl Eq for Color
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more