Git Product home page Git Product logo

snek's Introduction

snek

Lines of Code

Cover

It's snake. But snek. In Python. It supports all OSes that Python can run on, and was designed to look like a retro game from the early 80s. It runs entirely in your terminal, no GUI libraries required. It is written in just over 200 lines of code, and if you remove the fancy formatting while maintaining readability it would be around 150 lines of code.

The world width and height is automatically set to the maximum it can be for the size of terminal it is running in, so please don't make the terminal size smaller while playing. Currently the only ways to die are by hitting the world borders, or hitting the snake's body, in which case the score (but not high score), will reset.

Installation

Note

Please make sure you have support for Unicode fonts enabled in your system's settings. If you don't, the game will not look as it should.

Running from source

  • Make sure you have Python installed and is in your system environment variables as python. If you do not have Python installed, you can install it from here.
  • Download and extract the repository from here. Alternatively, you can clone the repository with Git by running git clone https://github.com/skifli/snek in a terminal.
  • Navigate into the root directory of your clone of this repository.
  • Run the command python -m pip install -r requirements.txt.

Usage

  • Run the command python snek.py in the root of your clone of this repository.

Known Bugs

Please see bugs.md.

snek's People

Contributors

skifli avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.