ruben-snake-cmd


Nameruben-snake-cmd JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://github.com/Ruben9922/snake-cmd
SummaryCommand-line version of the classic Snake game.
upload_time2022-12-11 15:08:14
maintainer
docs_urlNone
authorRuben Dougall
requires_python>=3.6
license
keywords snake game console command-line curses
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Snake

[![Build Status](https://travis-ci.com/Ruben9922/snake-cmd.svg?branch=master)](https://travis-ci.com/Ruben9922/snake-cmd)
[![PyPI](https://img.shields.io/pypi/v/ruben-snake-cmd)](https://pypi.org/project/ruben-snake-cmd/)
[![ruben-snake-cmd](https://snapcraft.io//ruben-snake-cmd/badge.svg)](https://snapcraft.io/ruben-snake-cmd)
[![GitHub](https://img.shields.io/github/license/Ruben9922/snake-cmd)](https://github.com/Ruben9922/snake-cmd/blob/master/LICENSE)

Command-line version of the classic Snake game.

![GIF showing gameplay](https://raw.githubusercontent.com/Ruben9922/snake-cmd/master/screenshot.gif)

## Installation

Install as usual:

```bash
pip install ruben-snake-cmd
```

You may wish to [create a virtual environment](https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments) beforehand.

### Installation on Windows
The game requires the curses library. This should already be installed on Linux and macOS so no additional steps are required. However, it is not included in the Windows version of Python, as noted in the [curses documentation](https://docs.python.org/3.7/howto/curses.html#what-is-curses). On Windows, you can install the `windows-curses` package (see [this comment](https://gist.github.com/sanchitgangwar/2158089#gistcomment-3029530)), using `pip install windows-curses`.

## Usage
Run the game using the following command:
```bash
ruben-snake-cmd
```
Note that I've only tested this on Linux.

The application should generally be self-explanatory.

One thing to note is the settings screen, reached by pressing <kbd>S</kbd> on the title screen. Currently, the only option is to enable/disable the snake wrapping around the edge of the window by pressing <kbd>B</kbd>. If disabled, the snake will "die" on reaching the edge of the window.

There is also a controls screen, reached by pressing <kbd>C</kbd> on the title screen.

## In-Game Controls

| Key(s) | Action |
|-------------------------------------------------------|------------------|
| <kbd>←</kbd>, <kbd>↑</kbd>, <kbd>→</kbd>, <kbd>↓</kbd> | Change direction |
| <kbd>Q</kbd> | End game |

Note that these only apply in-game and not on other screens, such as the title screen or settings screen.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Ruben9922/snake-cmd",
    "name": "ruben-snake-cmd",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "snake game console command-line curses",
    "author": "Ruben Dougall",
    "author_email": "info.ruebz999@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/21/12/e89b20b1b6a5eac367110b662b0b05da48553b9893550c6ae0dbd71bbdf1/ruben-snake-cmd-0.3.0.tar.gz",
    "platform": null,
    "description": "# Snake\n\n[![Build Status](https://travis-ci.com/Ruben9922/snake-cmd.svg?branch=master)](https://travis-ci.com/Ruben9922/snake-cmd)\n[![PyPI](https://img.shields.io/pypi/v/ruben-snake-cmd)](https://pypi.org/project/ruben-snake-cmd/)\n[![ruben-snake-cmd](https://snapcraft.io//ruben-snake-cmd/badge.svg)](https://snapcraft.io/ruben-snake-cmd)\n[![GitHub](https://img.shields.io/github/license/Ruben9922/snake-cmd)](https://github.com/Ruben9922/snake-cmd/blob/master/LICENSE)\n\nCommand-line version of the classic Snake game.\n\n![GIF showing gameplay](https://raw.githubusercontent.com/Ruben9922/snake-cmd/master/screenshot.gif)\n\n## Installation\n\nInstall as usual:\n\n```bash\npip install ruben-snake-cmd\n```\n\nYou may wish to [create a virtual environment](https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments) beforehand.\n\n### Installation on Windows\nThe game requires the curses library. This should already be installed on Linux and macOS so no additional steps are required. However, it is not included in the Windows version of Python, as noted in the [curses documentation](https://docs.python.org/3.7/howto/curses.html#what-is-curses). On Windows, you can install the `windows-curses` package (see [this comment](https://gist.github.com/sanchitgangwar/2158089#gistcomment-3029530)), using `pip install windows-curses`.\n\n## Usage\nRun the game using the following command:\n```bash\nruben-snake-cmd\n```\nNote that I've only tested this on Linux.\n\nThe application should generally be self-explanatory.\n\nOne thing to note is the settings screen, reached by pressing <kbd>S</kbd> on the title screen. Currently, the only option is to enable/disable the snake wrapping around the edge of the window by pressing <kbd>B</kbd>. If disabled, the snake will \"die\" on reaching the edge of the window.\n\nThere is also a controls screen, reached by pressing <kbd>C</kbd> on the title screen.\n\n## In-Game Controls\n\n| Key(s) | Action |\n|-------------------------------------------------------|------------------|\n| <kbd>\u2190</kbd>, <kbd>\u2191</kbd>, <kbd>\u2192</kbd>, <kbd>\u2193</kbd> | Change direction |\n| <kbd>Q</kbd> | End game |\n\nNote that these only apply in-game and not on other screens, such as the title screen or settings screen.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Command-line version of the classic Snake game.",
    "version": "0.3.0",
    "split_keywords": [
        "snake",
        "game",
        "console",
        "command-line",
        "curses"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "05f2646ca968f65e804527624a5a940b",
                "sha256": "b5c6bdef270563fffb778bb39d7f8c9b68eb53c5c8620c08c61e6815ea16d76e"
            },
            "downloads": -1,
            "filename": "ruben_snake_cmd-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "05f2646ca968f65e804527624a5a940b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 17773,
            "upload_time": "2022-12-11T15:08:12",
            "upload_time_iso_8601": "2022-12-11T15:08:12.279320Z",
            "url": "https://files.pythonhosted.org/packages/0d/03/67e9baa7fd3ad1e5b60854d048f8c82a503df2611ef2aa17f4872985e032/ruben_snake_cmd-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "7a33bacc434829133054c3aadfa9c6d7",
                "sha256": "0603680800ce096cde56be118b3d360c75b18e953b8047d687c73b548725f247"
            },
            "downloads": -1,
            "filename": "ruben-snake-cmd-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7a33bacc434829133054c3aadfa9c6d7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 17375,
            "upload_time": "2022-12-11T15:08:14",
            "upload_time_iso_8601": "2022-12-11T15:08:14.202027Z",
            "url": "https://files.pythonhosted.org/packages/21/12/e89b20b1b6a5eac367110b662b0b05da48553b9893550c6ae0dbd71bbdf1/ruben-snake-cmd-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-11 15:08:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Ruben9922",
    "github_project": "snake-cmd",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "ruben-snake-cmd"
}
        
Elapsed time: 0.03631s