var botData = [
{
name: 'First Gen Learning Algorithm',
color: '#330d0d',
run: function() {
return ['north','east','south','west'][(Math.random()*4)|0];
}
},
{
name: 'B33-L1N3',
color: '#8a8c69',
run: function(me, others, coins) {
// Do nothing if there aren't any coins
if (coins.length == 0) return 'none';
// Sort by distance using Pythagoras' Theorem
coins = coins.sort((a, b) => (a[0] ** 2 + a[1] ** 2) - (b[0] ** 2 + b[1] ** 2));
// Closest coin
let target = coins[0];
let x = target[0];
let y = target[1];