Struct rlifesrc_lib::rules::ntlife::NtLifeGen
source · pub struct NtLifeGen {
b0: bool,
s8: bool,
gen: usize,
symmetry: Symmetry,
impl_table: Vec<ImplFlags>,
}
Expand description
Non-totalistic Life-like Generations rules.
This includes any rule that can be converted to a non-totalistic Life-like Generations rule.
Fields§
§b0: bool
Whether the rule contains B0
.
s8: bool
Whether the rule contains S8
.
gen: usize
Number of states.
symmetry: Symmetry
The symmetry of the rule.
impl_table: Vec<ImplFlags>
An array of actions for all neighborhood descriptors.
Implementations§
Trait Implementations§
source§impl ParseNtLifeGen for NtLifeGen
impl ParseNtLifeGen for NtLifeGen
A parser for the rule.
source§impl Rule for NtLifeGen
impl Rule for NtLifeGen
NOTE: This implementation does work when the number of states is 2.
§type Desc = NbhdDescGen
type Desc = NbhdDescGen
The type of neighborhood descriptor of the rule. Read more
source§fn new_desc(state: State, succ_state: State) -> Self::Desc
fn new_desc(state: State, succ_state: State) -> Self::Desc
Generates a neighborhood descriptor which says that all neighboring
cells have states
state
, and the successor has state succ_state
.source§fn update_desc(cell: &LifeCell<Self>, state: State, new: bool)
fn update_desc(cell: &LifeCell<Self>, state: State, new: bool)
Updates the neighborhood descriptors of all neighbors and the predecessor
when the state of one cell is changed. Read more
source§fn consistify<A: Algorithm<Self>>(
world: &mut World<Self, A>,
cell: CellRef<Self>
) -> Result<(), A::ConflReason>
fn consistify<A: Algorithm<Self>>( world: &mut World<Self, A>, cell: CellRef<Self> ) -> Result<(), A::ConflReason>
Consistifies a cell. Read more
impl Sealed for NtLifeGen
Auto Trait Implementations§
impl RefUnwindSafe for NtLifeGen
impl Send for NtLifeGen
impl Sync for NtLifeGen
impl Unpin for NtLifeGen
impl UnwindSafe for NtLifeGen
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