Skip to content

Azrielx86/ncurses-snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake

Snake game written in C using ncurses.

Compilation

You can compile this using make or with the following steps

On Linux

clang main.c menu.c -o Snake -lncurses

If you have troubles compiling it on Linux, try this (idk why but in Gentoo -lncurses was not enough)

clang main.c menu.c -o Snake $(pkg-config --cflags --libs ncurses)

On Windows

gcc main.c -lpdcurses -o Snake.exe

To install pdcurses on Windows, download MinGW, and pdcurses from here and follow this steps.

Preview

ncurses Snake

Debug

To show more information like the board size, the fruit coordinates and the snake coordinates, you can use the debug option.

clang -lncurses -DDEBUG main.c -o Snake

To do

Add score saving and loading