示例#1
0
 /*
  * Terminates all programs that might currently run.
  */
 private void endAllPrograms() {
   if (barcode != null) {
     barcode.end();
   }
   if (lineFollowing != null) {
     lineFollowing.end();
   }
   if (maze != null) {
     maze.end();
   }
   if (bridge != null) {
     bridge.end();
   }
   if (elevator != null) {
     elevator.end();
   }
   if (seesaw != null) {
     seesaw.end();
   }
   if (chainBridge != null) {
     chainBridge.end();
   }
   if (rolls != null) {
     rolls.end();
   }
   if (finalSpurt != null) {
     finalSpurt.end();
   }
   if (endboss != null) {
     endboss.end();
   }
 }
示例#2
0
 /*
  * Initializing the final boss mode.
  */
 private void finalBoss() {
   this.endboss =
       new EndBoss(drive, touchLeftSensor, touchRightSensor, sonicMotor, sonicSensor, colorSensor);
   endboss.run();
 }