render_example_test.gno
0.86 Kb · 25 lines
1package coinflipduel
2
3// ExampleRender pins the realm's Render output as a testable example.
4func ExampleRender() {
5 print(Render(""))
6 // Output:
7 // # Coin-Flip Duel
8 //
9 // Challenge another address to a coin flip. You call heads or tails up front; they accept and the block decides. No stakes -- just a record.
10 //
11 // - Total duels resolved: 0
12 // - No champion yet -- be the first to win a duel.
13 //
14 // ## How to play
15 //
16 // 1. `Challenge(opponentAddr, "heads"|"tails")` -- opens a duel, returns its ID.
17 // 2. The opponent calls `Accept(id)` -- flips the coin and settles it on the spot.
18 // 3. The challenger may `Cancel(id)` while it's still pending.
19 //
20 // View a duel at this realm's path plus its ID (e.g. `.../coinflipduel:3`), or a player's record plus their address (e.g. `.../coinflipduel:g1youraddress...`).
21 //
22 // ## Pending duels
23 //
24 // _none right now_
25}