mod life;
mod ntlife;
use crate::{
cells::{CellRef, State},
search::Reason,
world::World,
};
pub use life::{Life, LifeGen};
pub use ntlife::{NtLife, NtLifeGen};
#[cfg(doc)]
use crate::cells::ALIVE;
pub trait Rule: Sized {
#[doc(hidden)]
type Desc: Copy;
const IS_GEN: bool;
fn has_b0(&self) -> bool;
fn has_b0_s8(&self) -> bool;
fn gen(&self) -> usize;
#[doc(hidden)]
fn new_desc(state: State, succ_state: State) -> Self::Desc;
#[doc(hidden)]
fn update_desc(cell: CellRef<Self>, state: Option<State>, new: bool);
#[doc(hidden)]
fn consistify<'a, RE: Reason<'a, Self>>(
world: &mut World<'a, Self, RE>,
cell: CellRef<'a, Self>,
) -> bool;
}