An open API service indexing awesome lists of open source software.

https://github.com/vieitesss/2048-rs

2048 game written in Rust using crossterm crate
https://github.com/vieitesss/2048-rs

Last synced: 2 months ago
JSON representation

2048 game written in Rust using crossterm crate

Awesome Lists containing this project

README

        

# :two::zero::four::eight: game in Rust

This is the well known game [2048](https://en.wikipedia.org/wiki/2048_(video_game)) written in [Rust](https://www.rust-lang.org) using [crossterm](https://docs.rs/crossterm/latest/crossterm/) so you can play it directly in your terminal.

## Try it yourself

- Clone this repository
```shell
git clone https://github.com/vieitesss/2048-rs.git
```
- Change the directory
```shell
cd 2048-rs
```
- Run
```shell
cargo run --release
```

## How to play

In order to win, you have to be able to merge the cells to get a 2048 cell (Not yet implemented). From there, you can freely continue the game infinitely, until it is impossible to move and you lose.

| Key | Function |
|:--------------------------------------------------------------------------------------------:|:------------------------------:|
| | shift matrix in that direction |
|q Escape Shift + C Shift + D| exit |

## TODO

In preference order:

- Winning with a 2048 cell
- Points (calculate and show)
- "Play again" option
- Saved user stats (max points, games played, ...)
- Show controls menu