Enlever les alertes

This commit is contained in:
François Pelletier 2024-08-31 23:44:06 -04:00
parent 0789487841
commit e369061a9a

View file

@ -97,7 +97,7 @@ function update() {
collisionDetection();
if (bricks.length === 0) {
alert('Congratulations! You won!');
// Gagné !!
document.location.reload();
return;
}
@ -126,7 +126,7 @@ function update() {
ball.dx = Math.cos(angle) * speed;
ball.dy = -Math.abs(Math.sin(angle) * speed); // Ensure the ball always goes up
} else {
alert('GAME OVER');
// Game over!
document.location.reload();
}
}