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.92 Kb · 28 lines
 1package stair
 2
 3import (
 4	"gno.land/p/g15c02s5hhdny9uvr9za3xsyn9sw8p0klptrh6kf/cellar/flag"
 5	"gno.land/r/g15c02s5hhdny9uvr9za3xsyn9sw8p0klptrh6kf/cellar/hall"
 6)
 7
 8var info = flag.Info{
 9	Slug:       "stair",
10	Title:      "The Back Stair",
11	Difficulty: flag.Medium,
12	Category:   "crossing functions",
13	Brief: "The way down to the old vintages is guarded: only stewards on the roster may descend, " +
14		"and only the head steward appoints them, through the front door. The staff use a back stair " +
15		"that no wallet can reach. Get your name on the roster and descend.",
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{}) }