Trait gridsim::Rule[][src]

pub trait Rule<'a> {
    type Cell;
    type Neighbors;
    fn rule(_: Self::Cell, neighbors: Self::Neighbors) -> Self::Cell;
}

Defines a simulation for simple things like cellular automata.

Associated Types

The type of cells on the grid

The neighborhood of the rule

Required Methods

This defines a rule for how a cell and its neighbors transform into a new cell.

Implementors