Robot Rumble ALPHA
discord
try it!
boards
tutorial
docs
login
/
signup
def robot(state, unit): enemies = state.objs_by_team(state.other_team) closeEnemies = list(filter(lambda e: unit.coords.walking_distance_to(e.coords) == 1, enemies)) debug.inspect("closeEnemies", closeEnemies) closest = None if len(closeEnemies) > 0: closest = min(closeEnemies, key=lambda e: e.health) debug.inspect("picked enemy", closest) if closest != None: Action.attack(unit.coords.direction_to(closest.coords)) return Action.move(unit.coords.direction_to(Coords(9, 9)))
Made with <3 by Anton and Noa
github org