added more documentation
This commit is contained in:
31
README.md
31
README.md
@@ -1,15 +1,36 @@
|
||||
# Sanke
|
||||
A simple snake game in the terminal. No third party libraries needed.
|
||||
|
||||
## Demo
|
||||
Click image for video
|
||||
# Compiling
|
||||
Run:
|
||||
```sh
|
||||
compile.sh release
|
||||
```
|
||||
to compile an optimized build. The script creates a directory called 'target' that contains the executable.
|
||||
|
||||
[](https://www.youtube.com/watch?v=_coOVAW9qa4)
|
||||
See:
|
||||
```sh
|
||||
compile.sh help
|
||||
```
|
||||
for more.
|
||||
|
||||
## How it works
|
||||
# Running
|
||||
Run:
|
||||
```sh
|
||||
sanke
|
||||
```
|
||||
to play with defaults settings.
|
||||
|
||||
See:
|
||||
```sh
|
||||
sanke --help
|
||||
```
|
||||
for setting game options.
|
||||
|
||||
# How it works
|
||||
The program makes the terminal use non-canonical input and output by using termios. Then it updates and prints a 2D character array containing the board borders, snake, and food. Before terminating, the program restores canonical mode.
|
||||
|
||||
## Info
|
||||
# Info
|
||||
Only tested with the combination of
|
||||
- GCC
|
||||
- Linux
|
||||
|
||||
Reference in New Issue
Block a user