Update README
This commit is contained in:
parent
22746fc3fb
commit
220a486c9e
34
README.md
34
README.md
|
@ -1,7 +1,37 @@
|
||||||
# 2048
|
# 2048
|
||||||
|
|
||||||
A school project
|
A school project
|
||||||
To build copy paste following
|
|
||||||
```bash
|
To build, you need following developement dependencies: `meson`, `sdl2`, `sdl2_image`, `sdl2_ttf`, `ncurses`.
|
||||||
|
You can get these dependecies the following way:
|
||||||
|
|
||||||
|
## Arch Linux
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo pacman -S meson sdl2 sdl2_image sdl2_ttf ncurses
|
||||||
|
```
|
||||||
|
|
||||||
|
## Ubuntu
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo apt install meson libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev ncurses-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
# Builing and Running
|
||||||
|
|
||||||
|
To build, copy paste following:
|
||||||
|
|
||||||
|
```sh
|
||||||
meson builddir
|
meson builddir
|
||||||
meson compile -C builddir
|
meson compile -C builddir
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To run, run:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./builddir/src/2048
|
||||||
|
```
|
||||||
|
|
||||||
|
# Usage
|
||||||
|
|
||||||
|
You can pass `--help` as an command line argument to print help message. You can force incomplete TUI mode that exist for a demonstration of portability and independence of SDL. This TUI mode is incomplete only because it's missing few UI elements and not because it is not feasible. You can also force other sizes of the game area.
|
|
@ -76,7 +76,7 @@ void game_move(Game *game, Direction direction) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// make it so it can work with different directions
|
// make it so it can work with different directions
|
||||||
int directionality = b; // TODO: rename ugly name
|
int directionality = b;
|
||||||
if (direction == Down) {
|
if (direction == Down) {
|
||||||
directionality = a;
|
directionality = a;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue