Expand description
Conway’s Game of Life — small Rust library
This crate provides a simple, in-memory implementation of Conway’s Game of Life. The grid uses toroidal wrapping for neighbour calculations (edges wrap around). The main types exported are:
ConwayGameGrid— the main grid type. Create withConwayGameGrid::new(width, height).CellandUpdatedCell— primitives used to represent cell state and batched updates.
Example:
use conway_gol_rs::{ConwayGameGrid, UpdatedCell};
let mut g = ConwayGameGrid::new(10, 10);
g.set(5, 5, true);
g.iterate();
g.dump();Structs§
- Cell
- A single cell of the Conway’s Game of Life grid.
- Conway
Game Grid - Define a grid of cells for Conway’s Game of Life.
- Updated
Cell - Represents an updated cell position and the state it should have.