Skip to content

RaoniSilvestre/game-of-life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conway's game of life

GitHub repo size GitHub language count

2025-02-05.10-55-36.mp4

A simple and interactive terminal-based version of Conway's Game of Life, written in Rust! Customize the speed, draw your initial cells, and watch how the simulation evolves.

Controls

Key/Action Effect
Left Mouse Button Toggle cell state (alive/dead)
Enter Start or pause the simulation
q Quit the game

Running the project

You can run the project either with Cargo or inside a Docker container.

Running with Cargo

⚡ Note: The first build might take a few minutes as it downloads and compiles all dependencies.

Make sure you have Rust installed: https://www.rust-lang.org/tools/install

cargo run --release -q

You can also pass options:

cargo run -q -- -f 10

Running with Docker

⚡ Note: The first Docker build can take a few minutes too, due to Rust compilation.

First, build the image:

docker build -t game-of-life .

Then run it interactively:

docker run -it game-of-life

You can also pass flags, just like when running directly:

docker run -it game-of-life -f 10

CLI Help

❯ cargo run -q -- --help
Basic simulator for Conway's Game of Life

Usage: game-of-life [OPTIONS]

Options:
  -f, --fps <FPS>  Frames per second [default: 1]
  -h, --help       Print help
  -V, --version    Print version

About the project

This project is a fun exploration of terminal graphics and event handling using Rust. It focuses on a smooth user experience with real-time interaction and a simple CLI interface.

Contributions, feedback, and ideas are very welcome! 🚀

About

Implementação do conway game of life em rust!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors