Skip to content

iyakushev/rust.game_of_life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GAME OF LIFE IN RUST

Yet another implementation of Conway's "Game of Life", but now in Rust.

This implementation tries to save a bit on the memory and instead of implementing bit maps it only stores cells that are alive.

To run:

  1. cargo build --release.
  2. ./target/release/game_of_life [FLAGS] [OPTIONS] --file <FILE>

A list of arguments:

USAGE:
    game_of_life [FLAGS] [OPTIONS] --file <FILE>

FLAGS:
        --breathe    Does a 'breathing' effect between two colors (color and 255-color)
    -h, --help       Prints help information
        --rainbow    Makes everything ✨🌈
        --random     Generates random patterns across the field
    -v, --version    Prints version information

OPTIONS:
    -b, --background <BG>
            Sets background color. (Can be: black, red, blue, teal, white or HEX) [default: black]

    -c, --color <COLOR>
            Sets cell color. (Can be: black, red, blue, teal, white or HEX) [default: white]

    -f, --file <FILE>                            A path to the map with patterns (can contain only '0' and '1')
    -f, --frame-limit <FPS_LIMIT>                Puts a lock on a frame rate. [default: 100]
    -i, --interpolation <INTERPOLATION_STEPS>    Gradient interpolation steps [default: 500]
    -s, --size <SIZE>                            Sets cell size [default: 1]

Rendering is done with the SDL2.
CMD args are done with the Clap.

About

rust implementation of Conway's "Game of Life"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages