User prompt
the bonusFood will appear when the score is a multiple of 150
User prompt
bonusFood will appear for every difference of 150 score and the initial value from which the difference has to be checked is 0
User prompt
If the head touches the poison then the lives will be reduced by one and then the next poison will spawn after the head collects 8 food.
User prompt
If the poison is consumed by the head then the next poison will appear only after the head collects 8 food
User prompt
poison will only be generated after the head has collected exactly 8 food
User prompt
add music for life, poison, gameover, bonusFood
User prompt
bonus food will only appear exactly when the difference between the previous score to the current score is 150. where the initial score is 150
User prompt
add a background to the game
User prompt
bonus food will only appear exactly when the difference between the previous score to the current score is 150. where the initial score is 150
User prompt
life will only appear exactly when the score is a multiple of 100
User prompt
poison will only be generated after the head has collected exactly 8 food
User prompt
fix all the sound issues
User prompt
remove background completely
User prompt
remove the background and add a new background
User prompt
fix the game over and bonus food sound
User prompt
bonus food will only appear exactly when the difference between the previous score to the current score is 150. where the initial score is 150
User prompt
life will only appear exactly when the score is a multiple of 100
User prompt
poison will only be generated after the head has collected exactly 8 food
User prompt
fix the life and poison sound
User prompt
As the score reaches 30 introduce a stick of minimum 8 square inch in the middle to increase the difficulty level
User prompt
Introduce a bonus food when the head reaches a score of 150 - if head consumes the bonus food then the score will increase by 50 - The bonus food will be on the screen for 8 seconds - the bonus food will spawn at the difference of 150 score from the previous score (initial score is 150)
User prompt
Increase the speed of the head by 25%
User prompt
have a background for the game
User prompt
Introduce a factor life - If the head consumes the life increase the lives by 1 - The life will appear if the score is a multiple of 100 - The life will be on the screen only for 10 second - Maximum lives each player can have is 8, that is after 8 lives even if the head collects one extra life the lives count will not increase beyond 8
User prompt
increase the speed of the snake by 50% of the current speed
===================================================================
--- original.js
+++ change.js
@@ -142,10 +142,9 @@
scoreTxt.setText('Score: ' + score);
// Increase the food consumed count
foodConsumed += 1;
// Check if it's time to show the bonus food
- if (score - previousScore === 150 || previousScore === 0) {
- previousScore = score;
+ if (score % 150 === 0) {
// Position the bonus food at a new random location within the game, ensuring it does not appear on the border
bonusFood.x = Math.random() * (2048 - bonusFood.width) + bonusFood.width / 2;
bonusFood.y = Math.random() * (2732 - bonusFood.height) + bonusFood.height / 2;
// Show the bonus food for 8 seconds
Apple. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Poisonous Skull. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Pause icon. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
heart icon. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Snake Face. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Ostrich egg. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.