Enum rlifesrc_lib::config::NewState
source · pub enum NewState {
ChooseDead,
ChooseAlive,
Random,
}
Expand description
How to choose a state for an unknown cell.
Variants§
ChooseDead
Chooses the background state.
For rules without B0
, it always chooses DEAD
.
For rules with B0
, the background changes periodically.
For example, for non-Generations rules,
it chooses DEAD
on even generations,
ALIVE
on odd generations.
ChooseAlive
Chooses the opposite of the background state.
For rules without B0
, it always chooses ALIVE
.
For rules with B0
, the background changes periodically.
For example, for non-Generations rules,
it chooses ALIVE
on even generations,
DEAD
on odd generations.
Random
Random.
For non-Generations rules,
the probability of either state is 1/2
.
For Generations rules with n
states,
the probability of each state is 1/n
.
Trait Implementations§
source§impl<'de> Deserialize<'de> for NewState
impl<'de> Deserialize<'de> for NewState
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for NewState
impl PartialEq for NewState
impl Copy for NewState
impl Eq for NewState
impl StructuralEq for NewState
impl StructuralPartialEq for NewState
Auto Trait Implementations§
impl RefUnwindSafe for NewState
impl Send for NewState
impl Sync for NewState
impl Unpin for NewState
impl UnwindSafe for NewState
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