A CLI implementation of 2048, in rust
To play the game, first install the crate:
cargo install twozero48If you want to compile from source, ensure you have the rust tool chain installed, by going to after cloning to local and opening the directory in terminal, run
cargo runtwozero48
twozero48 --board-size 5 --winning 4096
twozero48 --help
---
CONTROLS:
WASD / arrow keys: move
Q / Esc / Ctrl-C: quitThe web app uses ratzilla to render the same Ratatui game UI in the browser!
check it out: shenoi.dev/twozero48
To build the web app, use trunk(requires wasm toolchain)
rustup target add wasm32-unknown-unknown
cargo install --locked trunk --version 0.21.14
trunk build --release- ratatui - the best way to build terminal UIs. period.
- crossterm - terminal handling done right.
- clap - breeziest cli argument parsing.
- rand - plug and play (pseudo)random number generation.
- criterion - easy benchmarking!
- ratzilla - eazipeazy ratatui on the web.
Code in this repository is licensed under the permissive MIT license. All code contributions are by default considered to be under the same.