mod life;
mod ntlife;
use crate::{
cells::{CellRef, LifeCell, State},
search::Algorithm,
world::World,
};
pub use life::{Life, LifeGen};
pub use ntlife::{NtLife, NtLifeGen};
use typebool::Bool;
#[cfg(doc)]
use crate::cells::ALIVE;
#[cfg_attr(not(github_io), doc = "Some of its items are hidden in the doc.")]
pub trait Rule: private::Sealed {
type Desc: Copy;
type IsGen: Bool;
fn has_b0(&self) -> bool;
fn has_b0_s8(&self) -> bool;
fn gen(&self) -> usize;
#[cfg_attr(not(github_io), doc(hidden))]
fn new_desc(state: State, succ_state: State) -> Self::Desc;
#[cfg_attr(not(github_io), doc(hidden))]
fn update_desc(cell: &LifeCell<Self>, state: Option<State>, new: bool);
#[cfg_attr(not(github_io), doc(hidden))]
fn consistify<A: Algorithm<Self>>(
world: &mut World<Self, A>,
cell: CellRef<Self>,
) -> Result<(), A::ConflReason>;
}
mod private {
pub trait Sealed: Sized {}
}