# 🧠 Memory Match
> ⚠️ **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 concentration game on a 4x4 grid of 8 emoji pairs. The board is shuffled
deterministically from the current block height (there is no on-chain RNG), so
every `NewGame` produces a reproducible layout for a given height. Flip tiles two
at a time: matching pairs stay face-up, mismatches flip back on your next move.
The realm tracks your move count and matched pairs and reports the solved state.
**Realm path:** `gno.land/r/REPLACE_ADDR/memory`
## How to play
- `Flip(index int)` — reveal the tile at `index` (0–15, row-major). The first
reveal starts an attempt; the second completes a *move*. Matching faces stay
up; a mismatch shows both tiles until your next `Flip` clears them.
- `NewGame()` — reshuffle the board using the current block height as the seed.
- `Render(path)` — renders the grid (❓ hidden, emoji revealed/matched), the move
count, matched-pair count, and whether the game is solved.
## Example calls
```
# start a fresh, height-seeded board
NewGame()
# reveal cell 0, then cell 5
Flip(0)
Flip(5)
# view the board
gnokey query vm/qrender --data "gno.land/r/REPLACE_ADDR/memory:"
```
Solve all 8 pairs to win; the render then shows your total move count.
<!-- 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 -->
Flip(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, index int)
NewGame(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string})
Render(path string) string
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.