Trait game_of_life_parsers::GameDescriptor [] [src]

pub trait GameDescriptor {
    fn survival(&self) -> &[u8];
fn birth(&self) -> &[u8];
fn live_cells(&self) -> &[Coord];
fn no_negative_coords(&self) -> Box<GameDescriptor>; }

Describes the initial state of a Game of Life.

Required Methods

Get the survival rules. Logically, this can contain up to 8 digits in the range [1,8].

Get the birth rules. Logically, this can contain up to 8 digits in the range [1,8].

Get the living cells. Coordinates can be negative, depending on the input file.

Copy this GameDescriptor, adjusting for negative coordinates in the living cells. The new GameDescriptor will not contain negative coordinates.

Implementors