Robot Rumble ALPHA
discord
try it!
boards
tutorial
docs
login
/
signup
def robot(state, unit): enemies = state.objs_by_team(state.other_team) allies = state.objs_by_team(state.our_team) closest_enemy = min(enemies, key=lambda e: e.coords.distance_to(unit.coords) ) closest_ally = min(allies,key=lambda e:e.coords.distance_to(unit.coords)) direction = unit.coords.direction_to(closest_enemy.coords) if state.turn < 10 and unit.coords.distance_to(closest_enemy.coords) == 1: return Action.attack(direction) else: return Action.move(direction) if state.run > 10: if unit.coords.distance_to(closet_enemy.coords)==1 and unit.coords.distance_to(closest_ally)==1: return Action.move(direction) else: return Action.attack(direction)
Made with <3 by Anton and Noa
github org