$ make $ sudo make install
nSnake
A ncurses implementation of the classic Snake game
|
nSnake is a implementation of the classic snake game with textual interface. It is playable at command-line and uses the nCurses C library for graphics.
Started as a test for me to learn nCurses and developed to be a serious project. I currently maintain it via Git and host it on several sites.
Currently, it works on GNU/Linux (tested on Debian/Ubuntu/Fedora) and Microsoft Windows (tested on Windows 7).
You can direct download the latest version for your OS (from SourceForge) here.
If you downloaded the source code, the following commands should compile and install the game on the default directories:
$ make $ sudo make install
By default, make install installs the package on the following directories:
/usr/local/bin/ Executable files /usr/local/share/man/man6/ Man page /var/games/ HighScore files
For more advanced installation instructions (including install the game on a custom directory) see the INSTALL file downloaded with the source.
The rules are the same of any snake game:
You control a hungry snake and the objective is to eat as many fruits you can. Each fruit eaten increases it’s size by two units. The game ends when the snake collides with the walls or itself. Currently, nSnake has two modes: With Borders and without borders. The challenge is to earn the biggest score possible by eating as many fruits as you can.
Numbers (1~9) Changes the game speed at the main menu Arrow Keys, WASD Moves the snake q Quits the game at any time p Pauses/Unpauses the game
-h, --help Displays the quick help text.
-l, --license Displays the program license and warranty.
-v, --version Displays the version and general information.
-r, --reset-scores Resets all the Highscores to default.
This site contains the complete documentation of the nSnake code. To see it, follow the links on the tab above. There are links to Data Structures and Files, with a list of all containing functions and structures.
The source comes with a copy of the documentation. To make a local copy:
$ make dox
This will create and place it on the doc/html subfolder. To access it, open the file doc/html/index.html.
There are online copies of the source code too: