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.

starter.gno

0.85 Kb · 19 lines
 1// Package starter registers the starter bots, so the arena has opponents from
 2// day one. Their code is in gno.land/p/g1ftppd2jpfx0p8cy08th4u9whwvqcpychhlad28/strategies.
 3package starter
 4
 5import (
 6	"gno.land/p/g1ftppd2jpfx0p8cy08th4u9whwvqcpychhlad28/strategies"
 7	"gno.land/r/g1ftppd2jpfx0p8cy08th4u9whwvqcpychhlad28/arena"
 8)
 9
10func init(cur realm) {
11	arena.RegisterStrategy(cross(cur), "hunter", strategies.Hunter)
12	arena.RegisterStrategy(cross(cur), "brawler", strategies.Brawler)
13	arena.RegisterStrategy(cross(cur), "coward", strategies.Coward)
14	arena.RegisterStrategy(cross(cur), "trickster", strategies.Trickster)
15}
16
17func Render(path string) string {
18	return "# Starter bots\n\nhunter, brawler, coward and trickster: see [their code](/p/g1ftppd2jpfx0p8cy08th4u9whwvqcpychhlad28/strategies) and [their records](/r/g1ftppd2jpfx0p8cy08th4u9whwvqcpychhlad28/arena).\n"
19}