User Tools

Site Tools


cs175:robocode_lab_-_cornerbot1

CornerBot1


Create a robocode robot called CornerBot1 that does the following:

  • Visit each corner of the battlefield.
  • The order in which the corners are visited does not matter.
  • One possible algorithm (discussed in class, 9/16)
    • Get my robot's initial heading (angle).
    • Determine angle to turn right to point to north wall.
      • 360º - initial heading
    • Turn right to point north.
    • Go ahead until I hit wall.
    • Make a 90º right turn
    • Repeat above 2 steps until I've reached all corners.

See this robot's source code.


cs175/robocode_lab_-_cornerbot1.txt · Last modified: 2014/09/25 00:15 by jchung

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki