https://github.com/raphgl/cnake
Terminal snake game in C11 and C++20
https://github.com/raphgl/cnake
game terminal-game tui
Last synced: 12 months ago
JSON representation
Terminal snake game in C11 and C++20
- Host: GitHub
- URL: https://github.com/raphgl/cnake
- Owner: RaphGL
- License: bsd-2-clause
- Created: 2023-01-08T21:17:46.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-11T17:58:18.000Z (over 1 year ago)
- Last Synced: 2024-11-11T18:39:43.725Z (over 1 year ago)
- Topics: game, terminal-game, tui
- Language: C
- Homepage:
- Size: 308 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cnake
This project constains 2 versions of the game.
A legacy version in C11 and a new version in C++20.
None is better than the other, they're simply different flavors of the same game (the C++ one is partially a rewrite).



# How to compile
Build dependencies:
- CMake (build system)
- Ncurses (library)
- A compiler with C++20 support
```sh
$ cmake . -DCMAKE_BUILD_TYPE=Release
$ make
```
After compiling you'll have a `cnake` for the C11 version and a `cnakepp` for the C++20 version.
# Controls
Move with WASD or the arrows keys
Press `p` to pause
Stay pressed to go faster
The game can be quit with `ctrl + c` or through the pause menu