Skip to content

vekovius/snake-game-terminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Snake Game for Terminal 🐍

A simple, classic Snake game that you can play directly in your Mac Terminal! This project was developed to practice Python and bring the classic Snake game to life in a text-based format.

About the Game

In this version of Snake, you control a snake to eat as much food as possible and grow longer. Avoid hitting the walls or the snake’s own tail, or the game will end.

Controls

  • Use the arrow keys to control the snake's direction.
  • Your goal is to "eat" the food items that appear randomly on the screen to make the snake grow longer.
  • Be careful not to collide with the walls or the snake's own body, or it's game over!

How to Download and Play

Step 1: Install Python (if you don't have it)

Most Macs come with Python pre-installed. To check if Python is installed:

  1. Open the Terminal app (you can find it in Applications > Utilities).

  2. Type the following command and press Enter:

    python3 --version
  3. If you see a version number like Python 3.x.x, you’re ready to go! If you see an error, download Python from https://www.python.org/downloads/ and follow the installation instructions.

Step 2: Download the Snake Game Code

1.	Go to this GitHub repository and download the game files:
•	Click the green Code button at the top of this page.
•	Select Download ZIP.
2.	Unzip the downloaded file. You should see a folder named something like snake-game-terminal-main.

Step 3: Run the Game

1.	Open the Terminal app again.
2.	In the Terminal, type cd  (with a space after cd).
3.	Drag the unzipped folder (e.g., snake-game-terminal-main) from Finder into the Terminal window to automatically insert the path.
4.	Press Enter to navigate to the game folder.
5.	Run the following command to start the game:python3 snake.py                                   
6.	Use the arrow keys to play. Try to eat the food and avoid crashing into the walls or yourself!

Step 4: Quit the Game

To quit the game at any time, simply close the Terminal window or press Ctrl + C in the Terminal.

Known Issues:

•	The game may not run properly on Windows due to differences in terminal handling. This version is specifically designed for macOS.
•	If you encounter any issues or have suggestions, please feel free to open an issue on GitHub.                                                                                                                                                                                                            

Enjoy the game! Feel free to share your feedback or improvements.

About

snake on Mac :)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages