Robot Rumble ALPHA
discord
try it!
boards
tutorial
docs
login
/
signup
# go right, eat if detected, once reach end, eat left def robot(state, unit): if not hasattr(unit, 'hitwall'): unit.hitwall = False if unit.hitwall: return hitwall() else: neighbor = (state.obj_by_coords(unit.coords + Direction.East)) #if neighbor and neighbor.obj_type == ObjType.Unit: # why doesn't python have if-let smh if neighbor and neighbor.team == Team.opposite: return Action.attack(Direction.East) elif neighbor and neighbor.obj_type == ObjType.Terrain: # we have hit wall unit.hitwall = True return hitwall() return Action.move(Direction.East) def hitwall(): return Action.attack(Direction.West)
Made with <3 by Anton and Noa
github org