challenge.gno
0.87 Kb · 28 lines
1package cask
2
3import (
4 "gno.land/p/g15c02s5hhdny9uvr9za3xsyn9sw8p0klptrh6kf/cellar/flag"
5 "gno.land/r/g15c02s5hhdny9uvr9za3xsyn9sw8p0klptrh6kf/cellar/hall"
6)
7
8var info = flag.Info{
9 Slug: "cask",
10 Title: "Cask Strength",
11 Difficulty: flag.Easy,
12 Category: "integer arithmetic",
13 Brief: "The cooper sells casks of the 1811 at a price no guest can pay, and every guest starts with " +
14 "a purse of 100 shillings. He does the sums himself and he never checks his own arithmetic. " +
15 "Own a million casks.",
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{}) }