Skip to main content

A terminal-based Snake game with colorful UI and high score tracking

Project description

Snake Game

A classic Snake game implemented in Python using the curses library. This terminal-based game features colorful graphics, score tracking, and an intuitive interface.

Demo

Snake Game Demo

Features

  • Colorful terminal-based UI
  • Score and high score tracking
  • Direction-aware snake appearance
  • Game over screen with restart option
  • Persistent high score storage

Requirements

  • Python 3.6 or higher
  • curses library (included in standard Python distribution)

Installation & Running

There are two ways to install and run the game:

Method 1: Using pip (Recommended)

  1. Install the package:

    pip install terminal-snake-game
    
  2. Run the game:

    # Either use the command-line tool
    snake-game
    
    # Or run as a Python module
    python3 -m snake_game
    

Method 2: From Source

  1. Clone the repository:

    git clone git@github.com:SwetaTanwar/snake-game.git
    cd snake-game
    
  2. Run the game:

    # Using Python directly
    python3 snake_game.py
    

    Or make it executable first:

    # Make the script executable
    chmod +x snake_game.py
    
    # Then run directly
    ./snake_game.py
    

How to Play

Controls

  • Use arrow keys (↑ ↓ ← →) to control the snake
  • Eat ★ to grow and score points
  • Press 'q' to quit
  • Press 'r' to restart after game over

Game Elements

  • 🐍 Snake head shows direction (▶ ◀ ▲ ▼)
  • ◆ Snake body
  • ★ Food
  • Score and high score display at the top
  • Control instructions at the bottom

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

terminal_snake_game-1.0.2.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

terminal_snake_game-1.0.2-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file terminal_snake_game-1.0.2.tar.gz.

File metadata

  • Download URL: terminal_snake_game-1.0.2.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for terminal_snake_game-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d244c582072567209ca5913b83069230d64ca072a8ccb7d71c359f11392c0dbf
MD5 33f5a9aaa89a57335896a451f51b27d7
BLAKE2b-256 9242f98f382c60aa914b3b717523190134530a76af018c5a8759bed6977ab47e

See more details on using hashes here.

File details

Details for the file terminal_snake_game-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for terminal_snake_game-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 92c0af95ec4d8cf2ff456e239a5079242a47270e2461c1566ca1602ea619d7bb
MD5 2f845f1183eeb64bb6417e63bb124cc4
BLAKE2b-256 4ad85f4bf4c4b6d1571eb599138f5c33b4055a9eaba19eed880edd95b93d8589

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page