Enum rlifesrc_lib::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