1 stable release
Uses old Rust 2015
1.0.0 | May 7, 2020 |
---|
#659 in Games
24KB
707 lines
2048
How to play
First, clone this repository
git clone https://github.com/7ma7X/2048.git
cd 2048
To start game,
cargo build
./target/debug/rust2048
or simply
cargo run
KEY | manipulation |
---|---|
i / I | move up |
m / M | move down |
j / J | move left |
k / K | move right |
if you want to change this keybind, please modify the conditions in src/main.rs
listed below...
if input.starts_with("i") || input.starts_with("I") {
// move up
} else if input.starts_with("m") || input.starts_with("M") {
// move down
} else if input.starts_with("j") || input.starts_with("J") {
// move left
} else if input.starts_with("k") || input.starts_with("K") {
// move right
How to test
cargo test
Dependencies
~0.7–7.5MB
~47K SLoC