Robot Rumble ALPHA
discord
try it!
boards
tutorial
docs
login
/
signup
import math import random #id_enemies % 2 == 0 #id_allies % 2 !=0 grid_length = 19 target_id = None def robot(state,unit): enemies = state.objs_by_team(state.other_team) allies = state.objs_by_team(state.our_team) closet_enemies = min(enemies, key= lambda e: e.coords.walking_distance_to(unit.coords)) debug.inspect(closet_enemies) team_coords = [obj.coords for obj in state.objs_by_team(unit.team)] direction = unit.coords.direction_to(closet_enemies.coords) if unit.coords.distance_to(closet_enemies.coords) == 1: return Action.attack(direction) else: return Action.move(direction)
Made with <3 by Anton and Noa
github org