Scoring and awarding system improvements

This commit is contained in:
2025-12-07 16:58:19 +02:00
parent 02b29e920e
commit b544247c58
4 changed files with 14 additions and 4 deletions
@@ -45,6 +45,10 @@ class MazeQuizGame extends EventManager {
data.noPhysics = true;
params.mazeFile = data.style || 'quiz-s2.gltf';
params.io = this;
this.maxPoints = (data.points || 0) + (data.questionPoints||0) * data.questions.length;
this.minPoints = this.maxPoints - (data.questionPenalty||0) * data.questions.length;
return new Promise(async (resolve, reject)=>{
let questions = data.shuffle ? Utils.shuffleArray(data.questions) : data.questions;
let def = this.generate(questions);