A simple implementation of game of life in Rust. I just want to learn the basic syntax of Rust.
Please install the SDL2
library and set the RUSTFLAGS
, e.g.:
export RUSTFLAGS="-L ${HOME}/opt/sdl2/lib"
Build and run as usual:
cargo run
q
orEsc
to exit.SPACE
to pause the event loop.RETURN
to increase the simulation speed.C
to clear the world after pausing the loop.R
to generate a new random initial state after pausing the loop.Click
andMove
to invert the state of a cell after pausing the loop.