Conway's Game of Life is a cellular automaton devised by mathematician John Conway. It's a zero-player game where the evolution is determined by its initial state.
The Rules
- Any live cell with 2 or 3 live neighbors survives
- Any dead cell with exactly 3 live neighbors becomes a live cell
- All other cells die or stay dead
How It Works
This implementation uses Rust compiled to WebAssembly for the game logic. The Rust code handles:
- Grid state management
- Neighbor counting with wraparound edges
- State transitions each generation
The canvas rendering happens in JavaScript, receiving the cell data directly from WASM memory.
Try It
Click cells to toggle them, or use the randomize button to generate a random pattern. Press play to watch generations evolve.