Skip to content

Zones

Your code will probably need to look for different markers depending on the zone your robot starts in. Whilst you could have different files for each zone, there’s also a property on the robot object for this.

Python

robocon.zone will indicate the starting zone of your robot, this is the same as your team colour in the arena.

TeamCode
Redrobocon.TEAM.RED
Bluerobocon.TEAM.BLUE
Greenrobocon.TEAM.GREEN
Yellowrobocon.TEAM.YELLOW

Here’s an example:

import robocon
if robocon.zone == robocon.TEAM.RED:
print("Do something!")
else:
print("Do something else!")

Blockly

You can find the zone block in the Movement section.