pub enum Winner {
PlayerJustMoved,
Draw,
PlayerToMove,
}
Expand description
The result of playing a game until it finishes.
Variants§
PlayerJustMoved
The player who made the last move won.
Draw
Nobody won.
PlayerToMove
The player who made the last move lost.
This is uncommon, and many games (chess, checkers, tic-tac-toe, etc) do not have this possibility.
Implementations§
Trait Implementations§
source§impl PartialEq for Winner
impl PartialEq for Winner
impl Copy for Winner
impl Eq for Winner
impl StructuralEq for Winner
impl StructuralPartialEq for Winner
Auto Trait Implementations§
impl RefUnwindSafe for Winner
impl Send for Winner
impl Sync for Winner
impl Unpin for Winner
impl UnwindSafe for Winner
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