Skip to content Search Apps Documentation Source Content Run Reset Eval Playground 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.

challenge.gno

0.89 Kb · 28 lines
 1package rack
 2
 3import (
 4	"gno.land/p/g15c02s5hhdny9uvr9za3xsyn9sw8p0klptrh6kf/cellar/flag"
 5	"gno.land/r/g15c02s5hhdny9uvr9za3xsyn9sw8p0klptrh6kf/cellar/hall"
 6)
 7
 8var info = flag.Info{
 9	Slug:       "rack",
10	Title:      "The Open Rack",
11	Difficulty: flag.Medium,
12	Category:   "storage authority",
13	Brief: "The reserve rack is posted on the cellar door for every realm to read. Gno makes other " +
14		"realms' objects read-only, so the keeper sleeps soundly. Nobody has ever reserved the " +
15		"1811 Château d'Yquem. Collect it in your name.",
16}
17
18var captures = flag.NewLedger()
19
20type challenge struct{}
21
22func (challenge) Info() flag.Info              { return info }
23func (challenge) Captured(player address) bool { return captures.Captured(player) }
24
25// Challenge describes this realm to a hall.
26func Challenge() flag.Challenge { return challenge{} }
27
28func init(cur realm) { hall.Enlist(cross(cur), challenge{}) }