Skip to content

Commit 1cf4df9

Browse files
committed
Fix code
1 parent 246e533 commit 1cf4df9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const game = () => {
99
attempts = 0; //set attempts to 0
1010
score = 0; //set score to 0
1111
levelScore = 0; //set level score to 0
12-
maxAttempts = Math.round(level * 0.5); //set max attempts based on level and difficulty
12+
maxAttempts = Math.max(Math.round(level * difficultyMultiplier)); //set max attempts based on level and difficulty
1313
guess = 0; //set initial guess value to 0
1414
maxGuess = 2 ** level; //set max guess value to 2 raised to level
1515
secret = randomInt(1, maxGuess); //set secret value to random integer between 1 and max guess value

0 commit comments

Comments
 (0)