// PKGPATH: gno.land/r/g1ftppd2jpfx0p8cy08th4u9whwvqcpychhlad28/z1 // A ranked run good enough for the top 10 is replayed, then kept as a ghost. package z1 import ( "strings" rules "gno.land/p/g1ftppd2jpfx0p8cy08th4u9whwvqcpychhlad28/brawl/v4" "gno.land/r/g1ftppd2jpfx0p8cy08th4u9whwvqcpychhlad28/brawl/v4" ) var _ = strings.Repeat func run(c int) string { a := strings.Repeat(string(rules.Encode(1, rules.None)), 9) + string(rules.Encode(1, rules.Attack)) b := strings.Repeat(string(rules.Encode(c, rules.None)), 9) + string(rules.Encode(4, rules.Special)) return strings.Repeat(a+b, 30) } var still = strings.Repeat(string(rules.Encode(rules.Still, rules.None)), 600) func main(cur realm) { id := brawl.Submit(cross(cur), brawl.HardBot, 0, rules.Reader, "Tester", run(0), 3, 60) println(brawl.GhostJSON(id)) println(brawl.GhostInputs(id) == run(0)) println(brawl.Render("")) } // Output: // {"id":10,"player":"g1uaj9za4jkmc4e49h2a2n0cru7jfv60lgcxcjf4","name":"Tester","class":4,"seed":0,"arena":"Tavern","gold":3,"botGold":60,"height":123} // true // # Code Arena brawl // // 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. // // ## Top 10 // // | # | Player | Class | Gold | Hard bot | Arena | Ghost | // |---|---|---|---|---|---|---| // | 1 | Tester | Reader | 3 | 60 | Tavern | [#10](:ghost/10) | // // 1 runs so far. // // Need testnet GNOT to play? Get it free at [faucet.gno.land](https://faucet.gno.land).