We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0ffe37 commit 042aa9cCopy full SHA for 042aa9c
app.js
@@ -87,7 +87,13 @@ const game = () => {
87
} else {
88
//if guess is equal to secret number
89
feedbackText.textContent =
90
- "You guessed correctly! +" + levelScore + " points!";
+ "You guessed correctly! +" +
91
+ Math.round(
92
+ (((levelScore + maxGuess) * (maxAttempts - attempts + 1)) /
93
+ (attempts + 1)) *
94
+ maxAttempts,
95
+ ) +
96
+ " points!";
97
levelScore += maxGuess;
98
score += Math.round(
99
((levelScore * (maxAttempts - attempts + 1)) / (attempts + 1)) *
0 commit comments