From b34a9c295b59db73144b53f0ba2ffbce9b6c0318 Mon Sep 17 00:00:00 2001 From: alegarman2002 <116609314+alegarman2002@users.noreply.github.com> Date: Thu, 2 May 2024 01:47:39 +0200 Subject: [PATCH 1/3] Hotfix fixed problems with time --- webapp/src/components/FirstGame.js | 2 +- webapp/src/components/game/Calculator.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/webapp/src/components/FirstGame.js b/webapp/src/components/FirstGame.js index 02484a8a..0917daae 100644 --- a/webapp/src/components/FirstGame.js +++ b/webapp/src/components/FirstGame.js @@ -35,7 +35,7 @@ const Quiz = () => { setRemTime((progress) => { if(progress === 100){ checkAnswer(-1); - setTotalTime(totalTime + progress/10) + setTotalTime(totalTime + (10-progress/10)) return 0; } const diff = 4; diff --git a/webapp/src/components/game/Calculator.js b/webapp/src/components/game/Calculator.js index 249a40d0..39751846 100644 --- a/webapp/src/components/game/Calculator.js +++ b/webapp/src/components/game/Calculator.js @@ -33,7 +33,7 @@ const Calculator = () => { const time = setInterval(() => { setRemTime((progress) => { if(progress === 100){ - setTotalTime(totalTime + progress/10) + setTotalTime(totalTime + (10-progress/10)) gameStore(id, username, points, answeredQuestions, totalTime/answeredQuestions.length); init(); navigator('/menu') From a34b89747431594d66d344d838d7c832477eed5b Mon Sep 17 00:00:00 2001 From: alegarman2002 <116609314+alegarman2002@users.noreply.github.com> Date: Thu, 2 May 2024 01:53:56 +0200 Subject: [PATCH 2/3] Hotfix calculator timer --- webapp/src/components/game/Calculator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/components/game/Calculator.js b/webapp/src/components/game/Calculator.js index 39751846..7d22989f 100644 --- a/webapp/src/components/game/Calculator.js +++ b/webapp/src/components/game/Calculator.js @@ -33,7 +33,7 @@ const Calculator = () => { const time = setInterval(() => { setRemTime((progress) => { if(progress === 100){ - setTotalTime(totalTime + (10-progress/10)) + setTotalTime(totalTime + (80-progress/10)) gameStore(id, username, points, answeredQuestions, totalTime/answeredQuestions.length); init(); navigator('/menu') From b50e0e67b2ca1b3baaff303ecdb1b2973dab27a1 Mon Sep 17 00:00:00 2001 From: alegarman2002 <116609314+alegarman2002@users.noreply.github.com> Date: Thu, 2 May 2024 02:05:55 +0200 Subject: [PATCH 3/3] hotfix another time with questions time --- webapp/src/components/game/Calculator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/components/game/Calculator.js b/webapp/src/components/game/Calculator.js index 7d22989f..289d5bb9 100644 --- a/webapp/src/components/game/Calculator.js +++ b/webapp/src/components/game/Calculator.js @@ -33,7 +33,7 @@ const Calculator = () => { const time = setInterval(() => { setRemTime((progress) => { if(progress === 100){ - setTotalTime(totalTime + (80-progress/10)) + setTotalTime(totalTime + (80-progress/10)/questions.length) gameStore(id, username, points, answeredQuestions, totalTime/answeredQuestions.length); init(); navigator('/menu')