Skip to content

Conversation

@vashishtpurani
Copy link

Changes Made

  1. Difficulty Selection

    • Added a pre-game menu to select difficulty (Easy / Medium / Hard) affecting initial game speed.
  2. Dynamic Difficulty

    • Game speed increases progressively as the snake eats food (speed decreases by 20ms per food, min 80ms).
  3. Score Tracking

    • Introduced score variable, updated by +10 per food eaten.
    • Score displayed continuously, and final score shown on game over.
  4. Poisonous Food

    • Added poison food (🍄) that ends the game if eaten.
    • Poison spawns randomly, never inside the snake, and never on the same cell as normal food.
    • Poison repositions each time normal food is consumed.
  5. Safe Food/Poison Generation

    • Refactored food generation to ensure food and poison do not overlap or appear inside the snake.
  6. Game Rendering Updates

    • Displayed current speed, score, and snake length continuously during gameplay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant