Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1.12 KB

readme.md

File metadata and controls

41 lines (28 loc) · 1.12 KB

PySnake Game

This is a simple Snake Game implemented in Python using the Pygame library.

PySnake Header Image

How to Play

  1. Run the pysnake.py file.
  2. Use the arrow keys to control the snake:
    • Up arrow: Move the snake up
    • Down arrow: Move the snake down
    • Left arrow: Move the snake left
    • Right arrow: Move the snake right
  3. Try to eat the food (red square) to make the snake grow.
  4. Avoid collisions with the snake's own body and the game boundaries.
  5. The game ends when the snake collides, and a Game Over screen appears.
  6. Press 'Q' to quit the game or 'R' to retry.

Features

  • Snake blinks in a different color once it eats food.
  • The snake's speed increases slightly after eating food, making the game more challenging.
  • Game Over screen with options to retry or quit.

Requirements

  • Python 3.x
  • Pygame library

How to Install Pygame

pip install pygame

Acknowledgments

  • This game was created as a fun project and is freely available for download and modification.

Feel free to fork, modify, and use this code for learning and educational purposes. Happy coding!