Skip to content

nguyenttleo/SnakeGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Snake Game

This classic game is built using the Pygame library and offers a fun and addictive gameplay experience.

How to Play

  • Use the arrow keys or WASD keys to control the snake's movement.
  • Guide the snake to eat the red food dots to grow longer.
  • Avoid colliding with the boundaries or the snake's own body.
  • The game ends when the snake collides with a boundary or its own body.

Game Controls

  • Move Left: Arrow Left or A
  • Move Right: Arrow Right or D
  • Move Up: Arrow Up or W
  • Move Down: Arrow Down or S

Game Demo

To run the Snake Game, make sure you have Python installed along with the required dependencies listed in the requirements.txt file.

  1. Clone the project repository:

    git clone https://github.com/nguyenttleo/SnakeGame.git
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. Run the game:

    python main.py

Enjoy playing the Snake Game! Try to achieve the highest score by growing the snake as long as possible without colliding. Good luck!

Requirements

The following dependencies are required to run the Snake Game:

  • pygame

You can install the required dependencies by running:

pip install -r requirements.txt

Please ensure that you have the necessary dependencies installed before running the game.

Note: The game screen size is set to 800x600 pixels by default. You can modify the screen_height and screen_width variables in the code to adjust the game window size according to your preference.

Have fun and enjoy the game! 🎮

About

snake game made in python using pygame

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages