Command-line version of the classic Snake game.
Install as usual:
pip install ruben-snake-cmd
You may wish to create a virtual environment beforehand.
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. On Windows, you can install the windows-curses
package (see this comment), using pip install windows-curses
.
Run the game using the following command:
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 S on the title screen. Currently, the only option is to enable/disable the snake wrapping around the edge of the window by pressing B. If disabled, the snake will "die" on reaching the edge of the window.
There is also a controls screen, reached by pressing C on the title screen.
Key(s) | Action |
---|---|
←, ↑, →, ↓ | Change direction |
Q | End game |
Note that these only apply in-game and not on other screens, such as the title screen or settings screen.