Skip to content
The classic snake game written in Python Tkinter.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE.txt
README.md
graphic.jpg
snake.py

README.md

Python Snake

The classic snake game made in Python Tkinter. Written for Python2 by Fred Adams. Licensed under the MIT License. Python Snake Graphic

Overview

The game is just like the original: a snake trying to eat an apple. The snake is colored green, and the apple is red. You are the snake; move using the arrow keys, and avoid eating your own tail.

In this version, it is possible to move through walls, although it is possible to change this by editing the if statements starting on line 100.

The code is well commented, and only requires Python2 to be installed, however, it does use Tkinter, which should come pre-installed with Python2, but may not be for various reasons. Additional download information is below.

Basic Instructions

Use the arrow keys to move: the left arrow key to move left, the right arrow key to move right, the up arrow key to move up, and the down arrow key to move down.

Download and Play

  1. Make sure you have Python installed. Install Python at python.org. Most computers running macOS should have Python pre-installed. Check if you have Python installed by typing the command python and pressing enter in your command prompt or terminal. If a prompt like >>> shows up, then Python is installed.

  2. Run the following command to download and play Python Snake! Note that this will download a file called snake.py into your current working directory.

    curl https://xtrp.github.io/python-snake/snake.py -o snake.py && python snake.py

Bugs or Issues

If you find a bug or have an issue with Python Snake, feel free to Submit an Issue.

You can’t perform that action at this time.