Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

life/v0 package

Overview

Conway's Game of Life on Gno — the entire board lives on-chain. Anyone can call Step() to tick the simulation forward, load classic patterns, or sculpt cells one by one.

Functions

LoadPreset

func LoadPreset(name string)
Ask AI Claude ChatGPT

LoadPreset loads a classic Game of Life pattern onto the current board. Names: glider, blinker, toad, beacon, block, pulsar.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/nym-moultest123/x/daily/life/v0.LoadPreset()"

Result

MultiStep

func MultiStep(n int)
Ask AI Claude ChatGPT

MultiStep advances the simulation by n generations (capped at 100).

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/nym-moultest123/x/daily/life/v0.MultiStep()"

Result

Render

func Render(path string) string
Ask AI Claude ChatGPT

Render returns a Markdown snapshot of the current board.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/nym-moultest123/x/daily/life/v0.Render()"

Result

Reset

func Reset(w, h int)
Ask AI Claude ChatGPT

Reset clears the board and resizes it to w×h.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/nym-moultest123/x/daily/life/v0.Reset(,)"

Result

SetCell

func SetCell(x, y int, live bool)
Ask AI Claude ChatGPT

SetCell sets or clears a specific cell.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/nym-moultest123/x/daily/life/v0.SetCell(,,)"

Result

Step

func Step()
Ask AI Claude ChatGPT

Step advances the simulation by exactly one generation.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/nym-moultest123/x/daily/life/v0.Step()"

Result