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

render_example_test.gno

0.63 Kb · 19 lines
 1package rpsmatch
 2
 3// ExampleRender pins the realm's Render output as a testable example.
 4func ExampleRender() {
 5	print(Render(""))
 6	// Output:
 7	// # Rock-Paper-Scissors Arena
 8	//
 9	// Best-of-three matches against the house. First to 2 round wins takes the match.
10	//
11	// - Total rounds played: 0
12	// - No champion yet — be the first to win a match.
13	//
14	// ## How to play
15	//
16	// Call `Throw("rock"|"paper"|"scissors")` (or `r`/`p`/`s`). Your throw starts a new match if you don't have one in progress, and each call plays one round of it.
17	//
18	// View your own record at this realm's path plus your address, e.g. `.../rpsmatch:g1youraddress...`
19}