// PKGPATH: gno.land/r/g1ftppd2jpfx0p8cy08th4u9whwvqcpychhlad28/z1 // Save a bot, replace it, read it back and fight it. package z1 import "gno.land/r/g1ftppd2jpfx0p8cy08th4u9whwvqcpychhlad28/mybots/v3" func main(cur realm) { me := cur.Address().String() println(mybots.Get(me)) mybots.Save(cross(cur), "First", "c0t5i4f3j9r3a5b5s5d5k2") mybots.Save(cross(cur), "Sly Fox", "c1t3i1f6j8r6a7b2s5d4k0") println(mybots.Count(), mybots.Profile(me)) println(mybots.Get(me)) println(mybots.List(0, 10)) println(mybots.Versus(me, 9, 2, "")) println(mybots.Render("")) println(mybots.Render("bot/" + me)) } // Output: // null // 1 c1t3i1f6j8r6a7b2s5d4k0 // {"owner":"g1uaj9za4jkmc4e49h2a2n0cru7jfv60lgcxcjf4","name":"Sly Fox","profile":"c1t3i1f6j8r6a7b2s5d4k0","class":1} // [{"owner":"g1uaj9za4jkmc4e49h2a2n0cru7jfv60lgcxcjf4","name":"Sly Fox","profile":"c1t3i1f6j8r6a7b2s5d4k0","class":1}] // 0-64 // # Player bots // // Bots the brawler learned from how people play. Each one is a profile of eleven numbers, not code, stored as one short string. Play a few runs, then save yours from the end screen with `Save(name, profile)`; anyone can fight it, and rooms can use it as your fallback. // // | Bot | Class | Chases | Owner | // |---|---|---|---| // | [Sly Fox](:bot/g1uaj9za4jkmc4e49h2a2n0cru7jfv60lgcxcjf4) | Brawler | 67% | g1uaj9…cjf4 | // // 1 bot. // // Need testnet GNOT to play? Get it free at [faucet.gno.land](https://faucet.gno.land). // // # Sly Fox // // The bot g1uaj9…cjf4 taught by playing. It: // // - plays Brawler // - changes its plan every 0.3s // - stands still 5% of the time // - chases a rival who carries gold 67% of the time // - goes for the jackpot 89% of the time // - looks for gold up to 6 squares away // - swings at a rival in reach: 78% a tick // - blocks a rival in reach: 22% a tick // - fires its special when it pays 56% of the time // - dodges right after being robbed 44% of the time // - never runs away // // Profile: `c1t3i1f6j8r6a7b2s5d4k0`