Update index.html
Browse files- index.html +6 -3
index.html
CHANGED
@@ -103,13 +103,16 @@
|
|
103 |
}
|
104 |
} else if (ballY >= window.innerHeight) {
|
105 |
// Ball missed the platform
|
106 |
-
remainingLives
|
107 |
-
|
|
|
|
|
|
|
|
|
108 |
if (remainingLives <= 0) {
|
109 |
alert("Game Over! Your score is: " + currentScore);
|
110 |
resetGame();
|
111 |
}
|
112 |
-
resetBall();
|
113 |
}
|
114 |
};
|
115 |
|
|
|
103 |
}
|
104 |
} else if (ballY >= window.innerHeight) {
|
105 |
// Ball missed the platform
|
106 |
+
if (remainingLives > 0) {
|
107 |
+
remainingLives--;
|
108 |
+
updateLives();
|
109 |
+
resetBall();
|
110 |
+
}
|
111 |
+
|
112 |
if (remainingLives <= 0) {
|
113 |
alert("Game Over! Your score is: " + currentScore);
|
114 |
resetGame();
|
115 |
}
|
|
|
116 |
}
|
117 |
};
|
118 |
|