pub struct AutomataRules { /* private fields */ }Expand description
Any cellular automata has four different rules that govern how it works.
Any given cell has a certain amount of neighbors. Whether any cell is a neighbor of said cell is up to the neighbor method, which is either Moore or Von Neumann.
A cell must have a certain amount of neighbors to either become alive or stay alive.
Finally, cells in an automaton have a certain amount of ‘states’. Live cells have a state equal to whatever value you put in here, minus 1.
You can think of these states as the amount of time steps (or ticks) it takes for a cell to die. Given a cell which is alive but no longer has enough neighbors to survive, its state value will be decremented to 0 (dead) each tick.
Implementations§
Source§impl AutomataRules
impl AutomataRules
Trait Implementations§
Source§impl Clone for AutomataRules
impl Clone for AutomataRules
Source§fn clone(&self) -> AutomataRules
fn clone(&self) -> AutomataRules
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 moreAuto Trait Implementations§
impl Freeze for AutomataRules
impl RefUnwindSafe for AutomataRules
impl Send for AutomataRules
impl Sync for AutomataRules
impl Unpin for AutomataRules
impl UnwindSafe for AutomataRules
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