From 5aa2281ea66f8c857d8061b08de9c535c92bf14c Mon Sep 17 00:00:00 2001 From: BruArtist <60303299@udst.edu.qa> Date: Sun, 15 Feb 2026 18:14:07 +0300 Subject: [PATCH 1/4] Fix incorrect extra life calclulation in updateLives (fixes #1) --- script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.js b/script.js index 43cfa50..72a1cad 100644 --- a/script.js +++ b/script.js @@ -219,7 +219,7 @@ function updateWrongLetters() { } function updateLives() { - const livesLeft = gameState.maxWrong - gameState.wrongGuesses + 1; + const livesLeft = gameState.maxWrong - gameState.wrongGuesses; document.getElementById('livesLeft').textContent = livesLeft; } From dbec8213f976da384542cef4bfae0a58771a9932 Mon Sep 17 00:00:00 2001 From: BruArtist <60303299@udst.edu.qa> Date: Sun, 15 Feb 2026 18:33:21 +0300 Subject: [PATCH 2/4] Update script.js --- script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.js b/script.js index 72a1cad..464a842 100644 --- a/script.js +++ b/script.js @@ -219,7 +219,7 @@ function updateWrongLetters() { } function updateLives() { - const livesLeft = gameState.maxWrong - gameState.wrongGuesses; + const livesLeft = gameState.maxWrong - gameState.wrongGuesses +1 ; document.getElementById('livesLeft').textContent = livesLeft; } From 42940e7d4167182060abff903800750283a071e9 Mon Sep 17 00:00:00 2001 From: BruArtist <60303299@udst.edu.qa> Date: Sun, 15 Feb 2026 18:37:27 +0300 Subject: [PATCH 3/4] Update script.js --- script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.js b/script.js index 464a842..72a1cad 100644 --- a/script.js +++ b/script.js @@ -219,7 +219,7 @@ function updateWrongLetters() { } function updateLives() { - const livesLeft = gameState.maxWrong - gameState.wrongGuesses +1 ; + const livesLeft = gameState.maxWrong - gameState.wrongGuesses; document.getElementById('livesLeft').textContent = livesLeft; } From 2cd8dde91d376613e668c240c45c96841692a0cf Mon Sep 17 00:00:00 2001 From: BruArtist <60303299@udst.edu.qa> Date: Sun, 15 Feb 2026 18:42:23 +0300 Subject: [PATCH 4/4] Fix extra life bug --- script.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script.js b/script.js index 72a1cad..293a838 100644 --- a/script.js +++ b/script.js @@ -218,6 +218,8 @@ function updateWrongLetters() { } } +//test + function updateLives() { const livesLeft = gameState.maxWrong - gameState.wrongGuesses; document.getElementById('livesLeft').textContent = livesLeft;