Пример #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 seesaw mode.
   */
  private void seesaw() {
    this.seesaw = new Seesaw(drive, colorSensor);
    seesaw.run();

    // Start search for barcode.
    if (RACE_MODE && PROGRAM_FINISHED_START_BARCODE) {
      PROGRAM_FINISHED_START_BARCODE = false;
      LCD.clear();
      System.out.println("Mode: Barcode");
      barcode(true);
    }
  }