/* play the game */ private void play() { t0 = System.currentTimeMillis(); /*Times the beginning of the game */ currentTime = System.currentTimeMillis() - t0; generateRandomOrderTimes(); System.out.println("next t1 is in " + orderTimes.get(0)); System.out.println("next t2 is in " + orderTimes.get(1)); System.out.println("next t3 is in " + orderTimes.get(2)); while (System.currentTimeMillis() - t0 < ENDOFGAMETIME) { pause(100); /*Update the days label*/ daysElapsed = (int) ((System.currentTimeMillis() - t0) / (LENGTHOFADAY * 1000)); daysElapsedLabel.setLabel("DAYS " + daysElapsed); scanEquipments(); } }