Robot Rumble ALPHA
discord
try it!
boards
tutorial
docs
login
/
signup
function robot(state, unit) { console.log(state.__data.grid_size/2>>0); enemies = state.objsByTeam(state.otherTeam) closestEnemy = _.minBy(enemies, e => e.coords.distanceTo(unit.coords) ) direction = unit.coords.directionTo(closestEnemy.coords); if(unit.coords.distanceTo(closestEnemy.coords) === 1) { return Action.attack(direction); } else { return Action.move(unit.coords.directionTo(new Coords(10,10)).opposite); } }
Made with <3 by Anton and Noa
github org