User prompt
with the score gets higher the questions also get some complicated not very much
User prompt
Make the options in one line from up to down.
User prompt
make the font some bigger
User prompt
Like on the wrong answer screen gets red, on right answer the screen gets green.
User prompt
Show the timer on the screen.
User prompt
Make time limit on every answer for 5 seconds
User prompt
Score counts on right side, up side.
User prompt
Can't choose the options
User prompt
Make the options away from each other, I can't choose the options
User prompt
I cannot choose the options on every option I choose, that gets wrong.
Initial prompt
Math trivia
===================================================================
--- original.js
+++ change.js
@@ -11,10 +11,10 @@
self.wrongAnswers = [];
self.answerOptions = [];
// Method to generate a new math puzzle
self.generatePuzzle = function () {
- var num1 = Math.floor(Math.random() * 10) + 1;
- var num2 = Math.floor(Math.random() * 10) + 1;
+ var num1 = Math.floor(Math.random() * (10 + Math.floor(score / 10))) + 1;
+ var num2 = Math.floor(Math.random() * (10 + Math.floor(score / 10))) + 1;
self.correctAnswer = num1 + num2;
self.question = num1 + " + " + num2 + " = ?";
self.wrongAnswers = [self.correctAnswer + Math.floor(Math.random() * 3) + 1, self.correctAnswer - Math.floor(Math.random() * 3) - 1];
self.answerOptions = [self.correctAnswer].concat(_toConsumableArray(self.wrongAnswers));
@@ -139,9 +139,9 @@
}
// Start the first puzzle
startNewPuzzle();
// Initialize a variable to keep track of the time limit for each question
-var timeLimit = 300; // 5 seconds * 60 FPS
+var timeLimit = Math.max(60, 300 - score * 10); // Decrease time limit by 0.1 second for each point scored, with a minimum of 1 second
// Create a new Text2 object to display the timer
var timerText = new Text2('Time: ' + (timeLimit / 60).toFixed(1), {
size: 80,
fill: 0xFFFFFF