Skip to content

Snake game


For developing this simple snake game I used pygame library.

Snake Game code, the result looks like this:

gif

Installation

Python

This script is developed in python3.7 >, make sure you have this installed before run it.

  1. Clone main branch from my python-projects repo.

  2. Use the package manager pip to install requirements.

    Optional step

    This is an optional step, it is not needed.

    Create virtual environment
    python3 -m venv <venv_name>
    source <venv_name>/bin/activate
    
    Install requirements
    cd python-projects/game/snake
    pip install -r requirements.txt
    

Usage

How to run snake game after activating the virtual environment:

Execute snake game
    cd python-projects/game/snake
    python3 snake.py

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.