Update app.js

master
Andy Smy 2025-04-21 22:12:38 +01:00 committed by GitHub
parent 2e0aec20e8
commit 2a7d5427c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 3 deletions

View File

@ -200,7 +200,6 @@ function incrementWickets(inc) {
processing = true; processing = true;
E.showPrompt("Amend wickets by " + inc + "?").then(function(confirmed) { E.showPrompt("Amend wickets by " + inc + "?").then(function(confirmed) {
if (confirmed) { if (confirmed) {
E.showPrompt();
Bangle.buzz(); Bangle.buzz();
wickets += inc; wickets += inc;
var timeSig = new Date(); var timeSig = new Date();
@ -209,8 +208,12 @@ function incrementWickets(inc) {
if (confirmed) { if (confirmed) {
E.showPrompt(); E.showPrompt();
Bangle.buzz(); Bangle.buzz();
if(counter>0) counter -= 1; counter += inc;
if(counter<0) {
counter = 0;
} else {
addLog(timeSig, over, counter, "Correction", ""); addLog(timeSig, over, counter, "Correction", "");
}
resumeGame(); resumeGame();
} else { } else {
E.showPrompt(); E.showPrompt();