Open cooljoseph1 opened 4 years ago
You can do the same thing by editing RobotType as well.
Here's some sample code:
#bot.py
x = 0
def turn():
global x
x += 1
board_size = get_board_size()
team = get_team()
opp_team = Team.WHITE if team == Team.BLACK else team.BLACK
robottype = get_type()
if robottype == RobotType.OVERLORD:
RobotType.RUSH = True if x > 10 else False
if team == Team.WHITE:
index = 0
else:
index = board_size - 1
for i in range(board_size):
if not check_space(index, i):
spawn(index, i)
break
else:
log(str(RobotType.RUSH))
omg nice
You can add values to Team and use it for communication. E.g., the overlord can initially set
Team.RUSH = False
and later change it toTeam.RUSH = True
and the pawns can detect it.