diff --git a/index.html b/index.html index 2216810..cff0686 100644 --- a/index.html +++ b/index.html @@ -34,6 +34,17 @@

Select Difficulty

+ + + + + + diff --git a/script.js b/script.js index f54a3a4..7a8ef09 100644 --- a/script.js +++ b/script.js @@ -67,16 +67,22 @@ const restartGame = () => { const startGame = (difficulty) => { switch (difficulty) { case 'easy': - gameSpeed = 200; // Slower speed for easy + gameSpeed = 125; // Slower speed for easy break; case 'medium': - gameSpeed = 125; // Medium speed + gameSpeed = 100; // Medium speed break; case 'hard': gameSpeed = 75; // Faster speed for hard break; + case 'insane': + gameSpeed = 30; // Faster speed for hard + break; + case 'random': + gameSpeed = Math.floor(Math.random()*200); + break; } - + // Hide the difficulty modal document.getElementById("difficultyModal").style.display = "none"; @@ -87,6 +93,10 @@ const startGame = (difficulty) => { gameInterval = setInterval(initGame, gameSpeed); } +const next = (next) => { + document.getElementById("next").style.display = "none"; + } + // Main function to update the game state const initGame = () => { // Save the current tail position diff --git a/style.css b/style.css index fce24b5..f730a2b 100644 --- a/style.css +++ b/style.css @@ -39,7 +39,8 @@ body { display: grid; grid-template-rows: repeat(30, 1fr); grid-template-columns: repeat(30, 1fr); - background-color: #212837; + background: repeating-conic-gradient(rgb(14, 149, 81) 0% 25%, rgb(14, 113, 62) 0% 50%); + background-size: 39.5px 39.5px } .play-board .food {