Robot Rumble ALPHA
discord
try it!
boards
tutorial
docs
login
/
signup
import random enemy = 0 def init_turn(state): global enemy middleOfBoard = Coords(9, 9) enemies = list(state.objs_by_team(state.other_team)) closest = min(enemies, key=lambda e: e.coords.distance_to(middleOfBoard) ) enemy = closest def robot(state, unit): global enemy for e in state.objs_by_team(state.other_team): if unit.coords.walking_distance_to(e.coords) == 1: return Action.attack(unit.coords.direction_to(enemy.coords)) direction = unit.coords.direction_to(enemy.coords) if unit.coords.distance_to(enemy.coords) == 1: return Action.attack(direction) else: return Action.move(direction)
Made with <3 by Anton and Noa
github org