We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cf2936 commit 3dced0eCopy full SHA for 3dced0e
src/game/Runner.js
@@ -318,7 +318,12 @@ export default class Runner {
318
this.scheduleNextUpdate();
319
}
320
321
- this.generationEl.innerText = `Generation #${Runner.generation} | T-Rex x ${this.tRexGroup.lives()}`;
+ const lives = this.tRexGroup.lives();
322
+ if (lives > 0) {
323
+ this.generationEl.innerText = `Generation #${Runner.generation} | T-Rex x ${this.tRexGroup.lives()}`;
324
+ } else {
325
+ this.generationEl.innerText = 'GAME OVER';
326
+ }
327
328
329
/**
0 commit comments