terminal_game_of_life

Crates.ioterminal_game_of_life
lib.rsterminal_game_of_life
version1.0.1
sourcesrc
created_at2021-04-09 15:35:28.653058
updated_at2023-07-01 19:47:05.703759
descriptionConway's game of life implementation as a CLI rust crate
homepagehttps://git.sr.ht/~a14m/game-of-life/tree/master/CLI/rust/README.md
repositoryhttps://git.sr.ht/~a14m/game-of-life/tree/master/CLI/rust
max_upload_size
id381347
size67,513
(a14m)

documentation

README

GameOfLife

The implementation of the Conway's Game of Life rust package

Installation

$ cargo install terminal_game_of_life

Usage

$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

asciicast

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

  • Update the version number
  • Run cargo build --release and commit changes
  • Update the CHANGELOG
  • Create a git tag rust/v#{version_number} ex: rust/v0.1.1-pre

Extra information

Contributing

License

Code of Conduct

Commit count: 0

cargo fmt