2048 game implemented in terminal in Rust 🦀
You have to compile it yourself, but that shouldn't be a problem. Only thing
you need is cargo
:
cargo build -r
After its done compiling, you can start it in ./target/release/tui2048
Start 2048 game:
./tui2048
If you don't know what 2048 game is, your goal is to get tile with 2048 value. In order to get one, you need to combine tiles with the same value. Combining tiles is really easy. When they're next to each other, you can "push" them together and they will join to one tile with value equal to their sum.
You can use arrow keys to move all tiles in corresponding direction (for example, up arrow will move all tiles up as much as possible). When two tiles with the same value are next to each other in the corresponding direction, they will join and therefore you get one with greater value.
I already mentioned the goal of the game - getting tile with value of 2048 -
but what can also happen is that you fill the whole board and you can't join
any tiles. This is game over. You can then restart the game with r
key.
Arrow keys
: moving tilesEsc
/q
: exits the gamer
: restarts the game
I used these libraries:
- Author: Martan03
- GitHub repository: tui2048
- Author website: martan03.github.io