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 till
 2
 3import (
 4	"gno.land/p/g15c02s5hhdny9uvr9za3xsyn9sw8p0klptrh6kf/cellar/flag"
 5	"gno.land/r/g15c02s5hhdny9uvr9za3xsyn9sw8p0klptrh6kf/cellar/hall"
 6)
 7
 8var info = flag.Info{
 9	Slug:       "till",
10	Title:      "The Empty Till",
11	Difficulty: flag.Hard,
12	Category:   "coins",
13	Brief: "A round at the bar costs 0.1 GNOT, and the barkeep checks the money you sent before he " +
14		"pours. At closing, the auditor counts the till after every round: a round poured with less " +
15		"than its price in the till is a round stolen. Get yourself into the auditor's book.",
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{}) }