pub trait CellularAutomata<'a, CellDataType> {
    fn run(&mut self, _: &'a str);
    fn new() -> Self;
    fn input_handler(_: &mut Grid<'_, CellDataType>, _: &Reader, _: &Printer);
    fn output_handler(_: &Grid<'_, CellDataType>, _: &Printer);
}
Expand description

Trait CellularAutomata is a trait that all cellular automata must satisfy

Required Methods

Function run runs the cellular automata

Function new creates a new, empty cellular automata

Function input_handler takes the grid and a reader and modifies the grid according to what it reads. The printer argument is there just so the automata can prompt the user (if needed)

Function output_handler takes a grid and a printer and prints out something, according to the data of the grid.

Implementors