MCPcopy Create free account
hub / github.com/MolinDeng/Princeton-algs4 / run

Method run

LabEnv/09Lab/BoggleGame.java:572–584  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

570 */
571 private class Countdown extends TimerTask {
572 @Override
573 public void run() {
574 if (elapsedTime < GAME_TIME - 1) {
575 elapsedTime++;
576 String seconds = String.format("%02d", (GAME_TIME - elapsedTime) % SECONDS_PER_MINUTE);
577 String minutes = String.format("%02d", (GAME_TIME - elapsedTime) / SECONDS_PER_MINUTE);
578 String time = minutes + ":" + seconds;
579 clock.setText(time);
580 }
581 else {
582 endGame();
583 }
584 }
585 }
586
587 /**

Callers

nothing calls this directly

Calls 1

endGameMethod · 0.80

Tested by

no test coverage detected