open-oak-game-of-life

Crates.ioopen-oak-game-of-life
lib.rsopen-oak-game-of-life
version0.1.2
sourcesrc
created_at2022-12-31 17:24:51.410221
updated_at2022-12-31 18:50:03.89756
descriptionImplementation of Conway's Game of Life using open-oak as the front-end and conlife as the backend
homepage
repositoryhttps://github.com/christofferaakre/open-oak-game-of-life
max_upload_size
id748504
size128,874
Christoffer Aakre (christofferaakre)

documentation

README

open-oak-game-of-life

open-oak-game-of-life is an implementation of Conway's Game of Life (See https://en.wikipedia.org/wiki/Conway's_Game_of_Life) using conlife as the backend, and open-oak to render the front-end.

You provide the width and height of the grid, as well as the starting configuration, and it will open a window and run the simulation in real-time. The window can be closed by pressing Escape.

Installation

The simplest way to install is to run cargo install open-oak-game-of-life. Alternatively, you can clone this repository and build it from source: cargo build --release. Then you will find the compiled binary in target/release/open-oak-game-of-life.

Usage

Run open-oak-game-of-life --help to see the required arguments. If you provide just these, you will be greeted with an empty grid. To actually do something, you should provide the program with a starting configuration. To do so, use the -o or --object flag. The syntax is -o filename,xoffset,yoffset, for example -o objects/glider.life,31,27. This flag would load a glider object onto the grid at the position (31, 27). Object should be defined in .life files. Users can look at the example files in objects/ to get an idea of how to specify their own custom objects, or they can refer to the conlife documentation

Commit count: 14

cargo fmt