https://github.com/sven4500/cnake
Console version of the Snake video game
https://github.com/sven4500/cnake
c c-programming c-programming-language console console-application console-games snake snake-game snake-video-game video-game
Last synced: 3 months ago
JSON representation
Console version of the Snake video game
- Host: GitHub
- URL: https://github.com/sven4500/cnake
- Owner: sven4500
- License: mit
- Created: 2021-03-15T23:02:27.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-05-21T13:56:08.000Z (about 2 years ago)
- Last Synced: 2025-01-16T21:40:40.279Z (5 months ago)
- Topics: c, c-programming, c-programming-language, console, console-application, console-games, snake, snake-game, snake-video-game, video-game
- Language: C
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# cnake
Console version of the Snake video game. Written in pure C, straightforward linked list is implemented, adjustable screen size. Unit tests are implemented using gtest testing framework.```console
+------------------------------------------------------+
| | 3
| |
| |
| |
| |
| o |
| |
| |
| |
| <.? |
| |
| |
| |
| |
+------------------------------------------------------+
```## Testing
Unit tests are included in this repository. Run cmake providing `GTEST_INCLUDE`, `GTEST_LIB` and `GTEST_MAIN` definitions.
```bash
mkdir build
cd build
cmake -DGTEST_INCLUDE= -DGTEST_LIB= -DGTEST_MAIN= ..
````GTEST_INCLUDE` is location where gtest headers are stored. This directory should contain gtest folder with header files so that path to `#include ` is resolved.
`GTEST_LIB` points out for gtest library where all of gtest functionality is implemented.
`GTEST_MAIN` points out for gtest main library where entry point for running test is implemented. Size of this library is little. This library provides `int main` entry point to run tests.