TermSnake is a simple implementation of the famous Snake game.
It is developed in C language, and uses the ncurses library to display graphics in console mode.
Conception and implementation choices have been made to make TermSnake a fun C programming mini-project for beginners.
LEFT
orient the snake leftRIGHT
orient the snake rightUP
: orient the snake topDOWN
: orient the snake downQ
orq
: quit the game
- The game area has a fixed size, defined in advance
- The snake's speed increases each time a food is eaten, until reaching a maximum speed
- There is only one level of difficulty. The goal is to achieve the highest score
The project is written in C, fully compatible with C89/C90 standard.
The only dependency of the project is the ncurses library. The project was developed and tested with version 6.1 of ncurses.
On Ubuntu 18.04
sudo apt-get install cmake
On Ubuntu 18.04
sudo apt-get install build-essential
On Ubuntu 18.04
sudo apt-get install libncurses5-dev
On Ubuntu 18.04
mkdir build
cd build
cmake -G "Unix Makefiles" <source-dir>
cmake --build .
./termsnake
This project is licensed under the terms of the MIT license. You can check out the full license here.