https://github.com/kennfatt/cursedsnake
Snake game with ncurses (school assignment).
https://github.com/kennfatt/cursedsnake
cli cpp ncurses snake-game
Last synced: 9 months ago
JSON representation
Snake game with ncurses (school assignment).
- Host: GitHub
- URL: https://github.com/kennfatt/cursedsnake
- Owner: KennFatt
- Created: 2020-03-24T04:54:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-29T14:46:20.000Z (over 6 years ago)
- Last Synced: 2025-02-21T15:54:11.688Z (over 1 year ago)
- Topics: cli, cpp, ncurses, snake-game
- Language: C++
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CursedSnake
A simple [Snake game](https://en.wikipedia.org/wiki/Snake_(video_game_genre)) implementation with C++ and library `ncurses` [[wiki](https://en.wikipedia.org/wiki/Ncurses)].
## Manual build
### Requirements
You have to install `ncurses` to your computer before manually compile this repository.
**Debian based distro**:
```
sudo apt install libncurses-dev
```
**Arch Linux**:
```
sudo pacman -S ncurses
```
**Mac**:
```
brew install ncurses
```
**Windows**
For Windows users, you can build this project using [Cygwin](https://www.cygwin.com/).
Packages:
```
ncurses
libiconv
```
### Steps
1. Clone this repository
```
git clone https://github.com/KennFatt/CursedSnake.git
```
2. Change directory and run `make`
```
cd CursedSnake
make
```
3. Executable file will be generated and located at `out/$FILE_NAME`
## Background
Before we move our project with `ncurses`, we've been trying to render all to the default stream (`stdio`) and that's not possible to **handle keyboard signal simultaneously**.
Even that's still possible with **threading**, it would be more complicated things to do.
Therefore, we choose and use `ncurses` as our main library for rendering system. This library would work fine with POSIX and need some port for Windows.
## Authors
* Kennan Fattahillah [@KennFatt](https://github.com/KennFatt)
* Arvito Putra [@arvitoputra](https://github.com/arvitoputra)
* Sahla Dzulfika