Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Python Snake Game Using Pygame

This repository contains a classic Snake game implemented in Python using the Pygame library. The game features a simple snake that grows in length as it eats food, with the game ending if the snake runs into the game window edges or into itself.

Features

  • Simple Controls: Use the arrow keys to control the snake.
  • Score Tracking: The game keeps track of your score based on the length of the snake.
  • Game Over Screen: Provides options to either quit the game or play again after losing.

Pictures

Screen Shot 2023-11-24 at 3 00 04 PM Screen Shot 2023-11-24 at 3 06 24 PM

Requirements

To run this game, you need Python installed on your computer along with the Pygame library. You can install Pygame using pip:

pip install pygame

Installation

Clone this repository to your local machine:

git clone https://github.com/fmachta/python-snake-game.git
cd python-snake-game

Usage

Run the game using Python:

python snake_game.py

How to Play

  • Use the arrow keys (←, ↑, →, ↓) to control the movement of the snake.
  • Eat the red squares (food) to increase the length of the snake.
  • Avoid hitting the game window edges and the snake's own body.
  • The game ends if the snake hits the wall or itself, and your score is displayed on the game over screen.
  • Press 'Q' to quit or 'C' to play again after the game is over.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages