Skip to content

daniel-Jones/snake

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

snake in c and ncurses

Simple snake game written in C using ncurses. The code is well commented and should step you through the flow nicely. A thread is used for user input. Controls displayed on screen.

things to change

Change the board width and height by editing:

#define WIDTH 20
#define HEIGHT 20

Change the speed of the game by altering the int at the bottom of update() passed to usleep(). A recommended value is there commented out.

compiling and running

compile and run using:

gcc snake.c -o snake -lncurses -lpthread && ./snake

example

asciinema game example

About

Snake written in C and ncurses

Resources

License

GPL-2.0, GPL-3.0 licenses found

Licenses found

GPL-2.0
LICENCE
GPL-3.0
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published