Added good game ending instead of looping

This commit is contained in:
2024-04-19 10:34:00 +02:00
parent d26abea6a7
commit 5ee2c88341
4 changed files with 30 additions and 7 deletions

View File

@ -51,8 +51,8 @@ function displayQuestion() {
$("#loose").show();
}
else {
if(total < 2000) sef("pullup");
if (total < 2000) sef("pullup");
var index = 0;
// sends comrad Dwayne to help (or calls him back)
@ -77,9 +77,11 @@ function displayQuestion() {
indexesProgress++;
}
else {
shuffle(indexeslist);
indexesProgress = 0;
index = 0;
audio.pause();
sef("applause");
audio = new Audio('assets/music/march_vol_charged.mp3');
audio.play();
$("#win").show();
}
cQuestion = data["questions"][index];
$("[data-ans=1]").html(data["questions"][index]["answers"][0]["text"]);