Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/azrielx86/ncurses-snake

The snake game written in C with ncurses
https://github.com/azrielx86/ncurses-snake

c game ncurses ncurses-game snake-game

Last synced: 24 days ago
JSON representation

The snake game written in C with ncurses

Awesome Lists containing this project

README

        

# 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](./snake.gif)

## 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