@@ -19,7 +19,7 @@ const game = () => {
1919 feedbackText . textContent = "" ;
2020 maxText . textContent = maxGuess ;
2121 scoreText . textContent = score ;
22- attemptsText . textContent = attempts ;
22+ attemptsText . textContent = maxAttempts - attempts ;
2323 levelText . textContent = level ;
2424 guessText . max = maxGuess ;
2525 guessText . value = guess ;
@@ -67,7 +67,7 @@ const game = () => {
6767 secret = randomInt ( 1 , maxGuess ) ;
6868 maxText . textContent = maxGuess ;
6969 scoreText . textContent = score ;
70- attemptsText . textContent = attempts ;
70+ attemptsText . textContent = maxAttempts - attempts ;
7171 levelText . textContent = level ;
7272 guessText . max = maxGuess ;
7373 startButton . disabled = false ; //enable start button
@@ -99,7 +99,7 @@ const game = () => {
9999 secret = randomInt ( 1 , maxGuess ) ; //get random secret guess number
100100 maxText . textContent = maxGuess ;
101101 scoreText . textContent = score ;
102- attemptsText . textContent = attempts ;
102+ attemptsText . textContent = maxAttempts - attempts ;
103103 levelText . textContent = level ;
104104 guessText . max = maxGuess ;
105105 }
0 commit comments