This commit is contained in:
ashley 2025-04-27 12:52:28 +00:00
parent 6268bdebfb
commit 547f68c882

View File

@ -427,8 +427,8 @@
// Game state
let snake, dir, food, score, highScore = 0, level, gameInterval;
let state = 'start'; // 'start', 'playing', 'gameover'
const funnyMessages = [
"You got scaled!", "Snake bit ya!", "Sssorry, try again!", "Slither fail!", "Curveball!"
const endMessages = [
"Skill issue!", "Snake bit ya!", "Sssorry, try again!",
];
function resizeCanvas() {
@ -518,7 +518,7 @@
function endGame() {
clearInterval(gameInterval);
state = 'gameover';
gameOverText.textContent = funnyMessages[Math.floor(Math.random()*funnyMessages.length)];
gameOverText.textContent = endMessages[Math.floor(Math.random()*endMessages.length)];
gameOverScreen.classList.remove('hidden');
}