Нема описа

Aaro Saila c7b89aded5 changed some debugging functions to only compile when DEBUG is defined пре 3 месеци
src c7b89aded5 changed some debugging functions to only compile when DEBUG is defined пре 3 месеци
.gitignore 8b8160dcd7 added commandline arguments and deleted target пре 1 година
README.md 8b3c52f580 changed compiler to clang пре 3 месеци
compile.sh c7b89aded5 changed some debugging functions to only compile when DEBUG is defined пре 3 месеци

README.md

Sanke

A simple snake game in the terminal. No third party libraries needed.

Compiling

Run:

compile.sh release

to compile an optimized build. The script creates a directory called 'target' that contains the executable.

See:

compile.sh help

for more.

Running

Run:

sanke 

to play with defaults settings.

See:

sanke --help

for setting game options.

How it works

The program makes the terminal use non-canonical input and output by using termios. Then it updates and prints a 2D character array containing the board borders, snake, and food. Before terminating, the program restores canonical mode.

Info

Only tested with

  • Clang
  • GCC
  • Linux