Crate conway_gol_rs

Crate conway_gol_rs 

Source
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 with ConwayGameGrid::new(width, height).
  • Cell and UpdatedCell — 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.
ConwayGameGrid
Define a grid of cells for Conway’s Game of Life.
UpdatedCell
Represents an updated cell position and the state it should have.