Example #1
0
 /**
  * onHitRobot: If it's our fault, we'll stop turning and moving, so we need to turn again to keep
  * spinning.
  */
 public void onHitRobot(HitRobotEvent e) {
   if (e.getBearing() > -10 && e.getBearing() < 10) {
     fire(3);
   }
   if (e.isMyFault()) {
     turnRight(10);
   }
 }
 @Override
 public void onHitRobot(HitRobotEvent event) {
   if (event.isMyFault()) {
     reverseDirection();
   }
 }