pub struct StateInitialization<TetGen = StdTetGen> {
pub seed: u64,
pub tetromino_generator: TetGen,
}Expand description
Some values that were used to help initialize the game.
Note:
Game::state_initcannot be mutated by user.- It is not mutated by
Gameitself.
This struct is used for game reproducibility.
Fields§
§seed: u64The value to seed the game’s PRNG with.
tetromino_generator: TetGenThe method (and internal state) of tetromino generation used.
Trait Implementations§
Source§impl<TetGen: Clone> Clone for StateInitialization<TetGen>
impl<TetGen: Clone> Clone for StateInitialization<TetGen>
Source§fn clone(&self) -> StateInitialization<TetGen>
fn clone(&self) -> StateInitialization<TetGen>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<TetGen: Debug> Debug for StateInitialization<TetGen>
impl<TetGen: Debug> Debug for StateInitialization<TetGen>
Source§impl<TetGen: Hash> Hash for StateInitialization<TetGen>
impl<TetGen: Hash> Hash for StateInitialization<TetGen>
Source§impl<TetGen: Ord> Ord for StateInitialization<TetGen>
impl<TetGen: Ord> Ord for StateInitialization<TetGen>
Source§fn cmp(&self, other: &StateInitialization<TetGen>) -> Ordering
fn cmp(&self, other: &StateInitialization<TetGen>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<TetGen: PartialEq> PartialEq for StateInitialization<TetGen>
impl<TetGen: PartialEq> PartialEq for StateInitialization<TetGen>
Source§impl<TetGen: PartialOrd> PartialOrd for StateInitialization<TetGen>
impl<TetGen: PartialOrd> PartialOrd for StateInitialization<TetGen>
impl<TetGen: Copy> Copy for StateInitialization<TetGen>
impl<TetGen: Eq> Eq for StateInitialization<TetGen>
impl<TetGen> StructuralPartialEq for StateInitialization<TetGen>
Auto Trait Implementations§
impl<TetGen> Freeze for StateInitialization<TetGen>where
TetGen: Freeze,
impl<TetGen> RefUnwindSafe for StateInitialization<TetGen>where
TetGen: RefUnwindSafe,
impl<TetGen> Send for StateInitialization<TetGen>where
TetGen: Send,
impl<TetGen> Sync for StateInitialization<TetGen>where
TetGen: Sync,
impl<TetGen> Unpin for StateInitialization<TetGen>where
TetGen: Unpin,
impl<TetGen> UnsafeUnpin for StateInitialization<TetGen>where
TetGen: UnsafeUnpin,
impl<TetGen> UnwindSafe for StateInitialization<TetGen>where
TetGen: 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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more