summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimon-ec <simon@eustaceconsulting.com>2026-07-02 00:39:07 -0400
committersimon-ec <simon@eustaceconsulting.com>2026-07-02 00:39:07 -0400
commit5ff6c98738a2d7e1764a27220de07a1fae6a6755 (patch)
treeeef7ba67320f238d938e7c04c7edfdaa0f4ea562
parent8eec4837884427a80bda492d3e2001c3508378a5 (diff)
updated game text
-rw-r--r--quickdraw-game.html11
1 files changed, 7 insertions, 4 deletions
diff --git a/quickdraw-game.html b/quickdraw-game.html
index cf175ad..53d9ebf 100644
--- a/quickdraw-game.html
+++ b/quickdraw-game.html
@@ -101,7 +101,7 @@
<span id="intro1" class="hidden title">QUICK</span>
<span id="intro2" class="hidden title">DRAW</span>
- <!-- gamemode menu button-->
+ <!-- gamemode menu buttons-->
<div id="game-modes" class="hidden fade">
<button id="normal" onclick="handleNormalMode()">normal mode</button>
<button id="infinite">infinite mode</button>
@@ -152,6 +152,7 @@
let currentRound = 0;
let countingDown = false;
+ let totalTime = 0.0;
let roundTimeStart = 0;
let roundTimeEnd = 0;
let roundSeconds = 0.0;
@@ -232,6 +233,7 @@
console.log("game mode: " + gamemode);
currentRound = 1;
+ totalTime = 0;
center.addEventListener("mouseover", handleHoverStart);
center.addEventListener("mouseleave", handleHoverEnd);
@@ -305,11 +307,12 @@
}
roundTimeEnd = Date.now();
roundSeconds = (roundTimeEnd - roundTimeStart) / 1000;
+ totalTime += roundSeconds;
currentRound++;
- console.log('ROUND ' + currentRound + ' TIME: ' + roundSeconds);
- gameText.innerText = "TIME: " + roundSeconds + "\nhover on bullseye to start round " + currentRound;
+ console.log("ROUND: " + roundSeconds + "s\nTOTAL: " + totalTime + "\nhover on bullseye to start round " + currentRound);
+ gameText.innerText = "ROUND: " + roundSeconds + "s\nTOTAL: " + totalTime + "s\nhover on bullseye to start round " + currentRound;
gameText.style.display = "inline";
gameText.style.opacity = "100";
@@ -384,7 +387,7 @@
gameText.innerText = "click the targets as quickly as possible!\nhover on bullseye to start.";
}
else {
- gameText.innerText = "TIME: " + roundSeconds + "\nhover on bullseye to start round " + currentRound;
+ gameText.innerText = "ROUND: " + roundSeconds + "s\nTOTAL: " + totalTime + "s\nhover on bullseye to start round " + currentRound;
}
gameText.style.display = "inline";
countingDown = false;