pub enum GameState<P: Player> {
Playable,
Tie,
Win(P),
}
Expand description
Represents a move outcome
Variants§
Playable
It is still a player’s turn - the game continues.
Tie
The game ended in a tie - no players won
Win(P)
A player won.
Trait Implementations§
impl<P: Copy + Player> Copy for GameState<P>
impl<P: Eq + Player> Eq for GameState<P>
impl<P: Player> StructuralPartialEq for GameState<P>
Auto Trait Implementations§
impl<P> Freeze for GameState<P>where
P: Freeze,
impl<P> RefUnwindSafe for GameState<P>where
P: RefUnwindSafe,
impl<P> Send for GameState<P>where
P: Send,
impl<P> Sync for GameState<P>where
P: Sync,
impl<P> Unpin for GameState<P>where
P: Unpin,
impl<P> UnwindSafe for GameState<P>where
P: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)