#[non_exhaustive]pub enum StateType {
Normal,
Misere,
}
Expand description
Defines the ‘state’ the game is in.
Generally used by a game solver for better optimizations.
This is usually wrapped in an Option, as there are many games that do not classify as being under ‘Normal’ or ‘Misere.’ (i.e. tic-tac-toe)
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Normal
If a game is under ‘normal play’ convention, the last player to move wins. There are no ties in this variant.
Learn more: https://en.wikipedia.org/wiki/Normal_play_convention
Misere
If a game is under ‘misere play’ convention, the last player to move loses. There are no ties in this variant.
Learn more: https://en.wikipedia.org/wiki/Mis%C3%A8re#Mis%C3%A8re_game
Implementations§
Auto Trait Implementations§
impl Freeze for StateType
impl RefUnwindSafe for StateType
impl Send for StateType
impl Sync for StateType
impl Unpin for StateType
impl UnwindSafe for StateType
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