v4 source realm
Package mybots keeps each player's own brawl bot: the bot the game learned from how they play. A bot is not code, jus...
Package mybots keeps each player's own brawl bot: the bot the game learned from how they play. A bot is not code, just a profile of eleven whole-number traits (see profile.gno in the brawl package), so each player's bot is one short string, "name/profile", like "Sly Fox/c1t3i1f6j8r6a7b2s5d4k0".
Anyone can fight anyone's bot: brawl.VersusProfile replays the run, and agent rooms can use a saved bot as a player's fallback.
1
10
func Check
ActionCheck reports whether a bot can be saved: "ok" or the reason it is refused.
func Count
ActionCount is how many players have a bot.
func Describe
ActionDescribe says what a profile does, one plain line per trait.
func Get
ActionGet describes an address's bot as JSON, or "null".
func List
ActionList returns up to n bots (at most 50) as a JSON array, by address, skipping the first skip.
func Profile
ActionProfile returns an address's bot profile, or "" if it has none.
func Remove
crossing ActionRemove deletes the caller's bot.
func Render
Render lists the bots, or shows one at "bot/<address>".
func Save
crossing ActionSave stores the caller's bot, replacing the one they had.
func Versus
ActionVersus replays a run (your inputs, as class) against someone's bot and returns "yourGold-botGold". Use it as a read to check a run before telling anyone about it.