# Conway's Game of Life
> ⚠️ **Experimental — generated with no human supervision.** This realm was
> produced automatically by an MCP-driven agent to exercise the gno MCP server
> and tooling, and to generate test content for gno compilers, linters and
> formatters. **Not audited. Not for production.** Full context & folder README:
> [r/moul/x/daily](https://github.com/moul/gno-contracts/blob/main/r/moul/x/daily/README.md)
---
A port of Conway's classic cellular automaton to gno.land. The full board
lives on-chain — every generation tick is a real transaction, shared state
for whoever is watching.
**Realm path:** `gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/life`
## How it works
The board starts as a 20×15 grid seeded with a glider. Anyone can call
`Step()` to tick the simulation, load a classic pattern, or sculpt cells
by hand. All state persists between blocks.
## Example calls
```bash
# Advance one generation
gnokey maketx call -pkgpath gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/life -func Step ...
# Jump 10 generations at once
gnokey maketx call -pkgpath gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/life -func MultiStep \
-args '10' ...
# Load the classic glider (top-left corner)
gnokey maketx call -pkgpath gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/life -func LoadPreset \
-args 'glider' ...
# Paint a live cell at (5, 5)
gnokey maketx call -pkgpath gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/life -func SetCell \
-args '5 5 true' ...
# Resize to a 30×20 board (clears state)
gnokey maketx call -pkgpath gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/life -func Reset \
-args '30 20' ...
```
## Presets
| Name | Type | Period | Notes |
|------|------|--------|-------|
| `glider` | Spaceship | 4 | Travels diagonally |
| `blinker` | Oscillator | 2 | Simplest oscillator |
| `toad` | Oscillator | 2 | Two-row alternation |
| `beacon` | Oscillator | 2 | Two interlocked blocks |
| `block` | Still life | — | Stable 2×2 square |
| `pulsar` | Oscillator | 3 | Large symmetric pattern |
<!-- BEGIN GNOCONTRACTS FOOTER (generated by `make readmes`; do not edit below) -->
---
Part of **[moul/gno-contracts](https://github.com/moul/gno-contracts)** — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.
> 🧪 **Highly experimental — potentially vibe-coded.** Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: [DISCLAIMER](https://github.com/moul/gno-contracts/blob/main/DISCLAIMER.md).
<!-- END GNOCONTRACTS FOOTER -->
LoadPreset(name string)
MultiStep(n int)
Render(path string) string
Reset(w int, h int)
SetCell(x int, y int, live bool)
Step()
Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.
vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.