This is a simple implementation of the classic Snake game using Pygame.
The player controls a snake on a bordered plane. As it moves forward, it leaves a trail behind, resembling a moving snake. The game ends when the snake hits the screen border or itself.
- The snake can move in any direction according to user input.
- A target appears randomly within the screen which the snake can eat to grow longer.
- The game keeps track of the player's score which is equal to the length of the snake.
- The game ends and resets if the snake hits the screen border or itself.
- Python 3.x
- Pygame
- Install Python 3.x and Pygame.
- Clone this repository.
- Run
python main.pyto start the game.
- Use the W, A, S, D keys to control the snake's direction.
- The game can be closed by clicking the X on the window.
- Add different difficulty levels.
- Add a high score feature.
Enjoy the game!