- gcc
- ncurses library
on arch you can install them with:
sudo pacman -S ncurses
gcc main.c -lncurses -o snake
./snake -h 10 -w 20
height and width options are optional; if not provided terminal screen height and width will be used.
- h, j, k, l or arrow keys to move
- r to restart
- q to quit