Scanning for the Opponent
This is not a competition script, it just demonstrates how using a scan function to “look around” for an opponent could work.
The scan function checks for an opponent every 30 ms as it executes a list of maneuvers. Each maneuver is a list that you can use to set the left and right wheel speeds and the number of 30 ms time increments each maneuver should last.
On the sumo ring, this script will just cause the SumoBot to alter its direction slightly when it “sees” an object. It also turns away from the white borders.