Enum zero_sum::impls::tak::Resolution
[−]
[src]
pub enum Resolution { Road(Color), Flat(Color), Draw, }
The ways a game can end.
Variants
Road(Color)
One player has completed a road.
Flat(Color)
A player has run out of stones or the board is completely full, and one player has more flatstones.
Draw
A player has run out of stones or the board is completely full, and neither player has more flatstones.
Trait Implementations
impl Debug for Resolution
[src]
impl Resolution for Resolution
[src]
fn get_winner(&self) -> Option<u8>
Returns the index of the winning player (0 for white, 1 for black) if the value is either a Road
or a Flat
; None
otherwise.
fn is_draw(&self) -> bool
Returns true if the value is a Draw
.