Skip to content

adamhammoudd/Snake-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ Snake Game

A classic Snake game built using Pygame, featuring a home screen, score & time tracking and an end screen featuring stats and high scores.


Features

  • Home Screen: Input player name and start the game.
  • Dynamic Gameplay: The snake grows as it eats fruits, increasing difficulty.
  • Score Tracking: Track your high scores and game stats.
  • End Screen: Check out your stats and see the leaderboard for the highest score.

Getting Started

Prerequisites

  • Python 3.8 or higher
  • Pygame library Install Pygame using pip:
    pip install pygame
    

How to Play

  • Clone the repository or download the game files.
  • Run the script:
    python snake_game.py
  • Enter your name on the home screen and press "Start."
  • Use the arrow keys to control the snake: Up Arrow: Move up Down Arrow: Move down Left Arrow: Move left Right Arrow: Move right
  • Avoid hitting the walls or the snake's own body. Eat fruits to grow and increase your score.

Project Structure

  • snake_game.py: Main game file containing the logic and gameplay.
  • high_scores.json: File to save player high scores (auto-generated).

About

The game snake using pygame

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages