z1_top_filetest.gno
1.40 Kb · 43 lines
1// PKGPATH: gno.land/r/g1ftppd2jpfx0p8cy08th4u9whwvqcpychhlad28/z1
2
3// A ranked run good enough for the top 10 is replayed, then kept as a ghost.
4package z1
5
6import (
7 "strings"
8
9 rules "gno.land/p/g1ftppd2jpfx0p8cy08th4u9whwvqcpychhlad28/brawl"
10 "gno.land/r/g1ftppd2jpfx0p8cy08th4u9whwvqcpychhlad28/brawl"
11)
12
13var _ = strings.Repeat
14
15func run(c int) string {
16 a := strings.Repeat(string(rules.Encode(1, rules.None)), 9) + string(rules.Encode(1, rules.Attack))
17 b := strings.Repeat(string(rules.Encode(c, rules.None)), 9) + string(rules.Encode(4, rules.Special))
18 return strings.Repeat(a+b, 30)
19}
20
21var still = strings.Repeat(string(rules.Encode(rules.Still, rules.None)), 600)
22
23func main(cur realm) {
24 id := brawl.Submit(cross(cur), brawl.HardBot, 0, rules.Reader, "Tester", run(0), 3, 61)
25 println(brawl.GhostJSON(id))
26 println(brawl.GhostInputs(id) == run(0))
27 println(brawl.Render(""))
28}
29
30// Output:
31// {"id":10,"player":"g1uaj9za4jkmc4e49h2a2n0cru7jfv60lgcxcjf4","name":"Tester","class":4,"seed":0,"arena":"Tavern","gold":3,"botGold":61,"height":123}
32// true
33// # Code Arena brawl
34//
35// Ranked runs are against the Hard bot. Every score on this board was replayed by the chain before it counted, and each one can be fought as a ghost.
36//
37// ## Top 10
38//
39// | # | Player | Class | Gold | Hard bot | Arena | Ghost |
40// |---|---|---|---|---|---|---|
41// | 1 | Tester | Reader | 3 | 61 | Tavern | [#10](:ghost/10) |
42//
43// 1 runs so far.