README.md
Number Guessing Game
⚠️ 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
A gno.land realm (sapphire / gno 0.9) that hides a number between 1 and 100 and
lets anyone guess it. The target is derived deterministically from the block
height at which the round started (the GnoVM has no runtime RNG), so play is
reproducible and verifiable. Each guess returns higher, lower, or correct,
per-caller attempt counts are tracked, and solved rounds are recorded on a
leaderboard ranked by fewest guesses.
Realm path: gno.land/r/REPLACE_ADDR/numguess
Playing
Guess(n int)— submit a guess in1..100. Returns"higher","lower", or"correct"; increments your attempt count for the current round. Panics if the round is already solved.NewRound()— once the current round is solved, starts a fresh round with a new target derived from the current block height. Panics if the round is still open.Render(path)— the gnoweb view: current round number, attempts so far, the last hint, round status, and the winners' leaderboard.
Both Guess and NewRound are gno 0.9 crossing functions (cur realm first
parameter), so callers invoke them with the crossing convention.
Example calls
1# Guess 42 (via gnokey; addr/keyname/chain flags omitted for brevity)
2gnokey maketx call -pkgpath "gno.land/r/REPLACE_ADDR/numguess" \
3 -func Guess -args 42 ...
4
5# Start a new round after the current one is solved
6gnokey maketx call -pkgpath "gno.land/r/REPLACE_ADDR/numguess" \
7 -func NewRound ...
In a test or MsgRun ephemeral realm:
1import "gno.land/r/REPLACE_ADDR/numguess"
2
3hint := numguess.Guess(cross(cur), 42) // "higher" | "lower" | "correct"
4numguess.NewRound(cross(cur)) // after a solve
Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.
Dependency graph:

🧪 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.