Skip to content

mohamedelsayed843/Snake-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Snake-Game

Control the snake using arrow keys, eat food, and avoid crashing into walls or yourself — all in your terminal window!

Terminal Snake Game in Python

A classic Snake game implemented in Python using the curses library — playable directly in your terminal window!


Features

  • Real-time terminal-based gameplay
  • Control the snake using arrow keys
  • Food spawns randomly on the screen
  • Game over on wall collision or self-collision

Preview

Note: The game runs in the terminal (not GUI), so there is no graphical preview.


Requirements

Prerequisites

Make sure you have Python 3 installed.

For Windows users, you also need to install the windows-curses package:

pip install windows-curses

How to Run:

  • Clone the repository:

      git clone https://github.com/mohamedelsamin/Snake-Game.git
      cd Snake-Game
    
  • Run the Python file:

      python snake-game.py
    
  • Use the arrow keys ↑ ↓ ← → to control the snake.

About

Control the snake using arrow keys, eat food, and avoid crashing into walls or yourself — all in your terminal window!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages