A simple snake game written in C primarily using the Ncurses library and a few standard libraries.
Ncurses is a C library which helps to create a wrapper over terminal capabilities, allowing you to influence how data is presented and create a nice UI / terminal graphics representation
Here is an image below showing what the game will look like when played on the terminal:
C compiler (e.g gnu)
Unix-based OS (Ncurses provides capability for unix based terminals)
Clone the repository from Github
caidol@fedora ~ sudo git clone "https://github.com/caidol/Ncurses-Snake-C"
Change directory into repo folder location
caidol@fedora ~ cd Ncurses-Snake-C
Compile the C code, ensuring that the -lncurses linker flag is appended to the usual compilation command
caidol@fedora ~ gcc -o snake snake.c -lncurses # Make sure that you add the linker flag for ncurses
Then you will be able to run the executable and play the game with the wasd keys
caidol@fedora ~ ./snake