/* * Initializing the final spurt. */ private void finalSpurt() { FinalSpurt finalSpurt = new FinalSpurt( drive, sonicSensor, touchLeftSensor, touchRightSensor, sonicMotor, colorSensor); finalSpurt.run(); // Change final spurt -> final boss if (RACE_MODE && PROGRAM_CHANGED && PROGRAM_STATUS == PROGRAM_FINAL_BOSS) { PROGRAM_CHANGED = false; LCD.clear(); System.out.println("Mode: Final Boss"); finalBoss(); } }
/* * 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(); } }