diff options
| author | a14m <[email protected]> | 2021-04-08 22:18:55 +0200 |
|---|---|---|
| committer | a14m <[email protected]> | 2021-04-08 22:18:55 +0200 |
| commit | 877b0913c70d793e66fa5b2e922dcea69cbc738d (patch) | |
| tree | c2392069af1d6b37e9682e43ad2ed18cc12e118a /CLI/rust/README.md | |
| parent | 568723e8f8dc0ad74e69d5f04fe50d4ea80f1dc4 (diff) | |
Partially update the rust README
And update ruby example URL for better looking example
Diffstat (limited to 'CLI/rust/README.md')
| -rw-r--r-- | CLI/rust/README.md | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/CLI/rust/README.md b/CLI/rust/README.md index d6e5de0..471ea5d 100644 --- a/CLI/rust/README.md +++ b/CLI/rust/README.md @@ -6,7 +6,32 @@ The implementation of the [Conway's Game of Life](https://en.wikipedia.org/wiki/ TBD ## Usage -TBD + +```bash +$game-of-life -i https://example.com --live-cell + +$game-of-life -i /path/to/file.txt --height 35 --width 35 +$game-of-life -s 1337 --delay 250 +``` + +Check `game-of-life --help` for usage info. + +``` +USAGE: + game-of-life [OPTIONS] + +FLAGS: + -h, --help Prints help information + -V, --version Prints version information + +OPTIONS: + -s, --seed <seed> Specify the seed number to use as an initial state [default: random] + -i, --input <input> Specify the path/URL for the file to use as an initial state. (used instead of seed) + --width <width> Specify the width of generated universe. [default: terminal width] + --height <height> Specify the width of generated universe. [default: terminal height] + --live-cell <live-cell> Specify the live-cell representation [default: █] + --dead-cell <dead-cell> Specify the dead-cell representation [default: ] + -d, --delay <delay> Specify the introduced delay between each generation [default: 50] +``` ## Demo TBD @@ -15,12 +40,13 @@ TBD - Install rustup via `curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh` - Install rust stable version for development `rustup update` - Install rust nightly for testing via `rustup install nightly` +- Clone the repo +- Navigate to the rust CLI implementation `cd game-of-life/CLI/rust`. - run `cargo build` to build the crate/CLI binaries. - run `cargo run --` to run the built binaries. - ## Linting -TBD +Run `cargo fmt -- --check` ## Testing Run `cargo +nightly test` |
