Skip to content

Halip26/snake-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake Game

This is a simple implementation of the classic Snake game using Pygame library. The game involves controlling a snake to eat food and grow longer. The game is over if the snake hits the edges of the screen or collides with its own body.

Installation

To run the game, first ensure that Pygame is installed. You can install it by running the following command:

pip install pygame

Usage

Run the code using the following command:

$python snake_game.py

Contibute

To contribute to a project on GitHub, follow these steps:

  1. Fork the repository by clicking on the "Fork" button on the project's GitHub page.

  2. Clone the forked repository to your local machine by following the steps in the previous answer.

    git clone https://github.com/Halip26/snake-game.git
    
    cd snake-game
  3. Make changes or add new features to the codebase on your local machine.

  4. Stage and commit your changes using the command "git add " and then "git commit -m " in Git Bash.

  5. Push your changes back to your forked repository on GitHub using the command "git push origin ".

  6. Create a new pull request from your forked repository to the original repository by clicking on the "New pull request" button on the project's GitHub page.

  7. Write a detailed description of your changes and why they're necessary, and then click on the "Create pull request" button.

  8. Wait for the project maintainers to review your pull request, make any necessary changes, and then merge your changes into the main codebase.

Game Controls

Use arrow keys to control the movement of the snake. Press 'Q' to quit the game. Press 'C' to play again after losing. Credits

This game implementation was created by Halip26.

About

the classic Snake game using Pygame library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages