blob: 471ea5dc213bbd5b09a9575cc0b6cebb4021c713 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# GameOfLife
The implementation of the [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) rust package
## Installation
TBD
## Usage
```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
## Development
- 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
Run `cargo fmt -- --check`
## Testing
Run `cargo +nightly test`
## Documentation
Run `cargo doc`
## Release
TBD
## Extra information
### [Contributing](https://gitlab.com/a14m/game-of-life/-/blob/master/CONTRIBUTING.md)
### [License](https://gitlab.com/a14m/game-of-life/-/blob/master/LICENSE.md)
### [Code of Conduct](https://gitlab.com/a14m/game-of-life/-/blob/master/CODE_OF_CONDUCT.md)
|