Minor changes

This commit is contained in:
ElPumpo
2019-04-04 19:22:35 +02:00
parent cae59f4f25
commit 4baac86207
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -9,19 +9,19 @@ var nbPossibleQuestions = 10; // number of questions in database questions.js
var lastClick = 0;
function getRandomQuestion() {
var random = Math.floor(Math.random() * nbPossibleQuestions)
var random = Math.floor(Math.random() * nbPossibleQuestions);
while (true) {
if (questionUsed.indexOf(random) === -1) {
break
break;
}
random = Math.floor(Math.random() * nbPossibleQuestions)
random = Math.floor(Math.random() * nbPossibleQuestions);
}
questionUsed.push(random)
questionUsed.push(random);
return random
return random;
}
// Partial Functions