Enum shuuro::color::Color [−][src]
pub enum Color {
Blue,
Red,
NoColor,
}
Expand description
Represents each side of player. Blue player moves first.
Examples
use shuuro::Color;
let c = Color::Blue;
match c {
Color::Blue => assert!(true),
Color::Red => unreachable!(),
Color::NoColor => unreachable!()
}
Variants
Blue
Red
NoColor
Implementations
Returns the color of the opposite side.
Examples
use shuuro::Color;
assert_eq!(Color::Red, Color::Blue.flip());
assert_eq!(Color::Blue, Color::Red.flip());
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Color
impl UnwindSafe for Color
Blanket Implementations
Mutably borrows from an owned value. Read more