예제 #1
0
 private void setMissions() {
   if (turnIndex == 0) {
     screen.showMessage(24, 40, "YOU NEED " + neededMissions + " MISSIONS");
     missionBuffer = MISSION_BUFFER;
   }
   if ((turnIndex + 3) % MISSION_LENGTH == 0) {
     numMissions++;
     screen.showMessage(
         24, 40, "YOU HAVE " + numMissions, "OUT OF " + neededMissions + " MISSIONS");
     missionBuffer = MISSION_BUFFER;
   }
   if (Math.random() < .001 * Math.pow(.1, neededMissions - numMissions - 3)) {
     neededMissions += 5;
     screen.showMessage(24, 40, "THE NUMBER OF MISSIONS", "HAS BEEN RAISED TO " + neededMissions);
     missionBuffer = MISSION_BUFFER;
   }
 }
예제 #2
0
 void crash() {
   crashed = true;
   screen.showMessage(36, 300, "YOU LOSE.");
   Soundtrack.play("explosion.wav");
 }