Update app.js

Introduced call of time
master
Andy Smy 2025-04-21 23:54:28 +01:00 committed by GitHub
parent 28274b7929
commit 4fc1974552
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 6 deletions

View File

@ -140,7 +140,7 @@ function countDown(dir) {
processing = false;
}
function startOver(resume) {
function startPlay(resume) {
processing = true;
Bangle.setUI({
mode : "custom",
@ -182,13 +182,14 @@ function startOver(resume) {
}
});
} else {
if(timeCalled) {
}
}
if(timeCalled) {
timeCalled = false;
var lastTimeTime = timeTimes[timeTimes.length - 1];
var timeDuration = new Date(timeSig.getTime() - lastTimeTime);
addLog(timeSig, over, counter, "Play", "Lost: " + formatDuration(timeDuration));
}
}
}
// whether resuming or new over, refresh UI
countDown(0);
@ -197,9 +198,9 @@ function startOver(resume) {
function resumeGame() {
Bangle.buzz();
if(over==0) {
startOver();
startPlay();
} else {
startOver(true);
startPlay(true);
}
}