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
- Host: GitHub
- URL: https://github.com/vieitesss/2048-rs
- Owner: vieitesss
- Created: 2024-01-01T11:56:52.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-02T12:18:35.000Z (3 months ago)
- Last Synced: 2025-04-02T13:27:06.250Z (3 months ago)
- Language: Rust
- Homepage:
- Size: 640 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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