Skip to content

Soum-Soum/RustGameOfLife

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Game of Life - Rust & Bevy 🦀

Game of Life Rust Bevy License

📜 Introduction

This project is an implementation of Conway's famous "Game of Life", built with Rust and the Bevy game engine. It's my first Rust project, created to learn the basics of the language.

Game of Life Demo

✨ Features

  • 🔲 Configurable grid size (currently 50x25)
  • 🎨 Minimalist graphical interface with Bevy
  • ⏱️ Simulation time control
  • 🎲 Random cell generation
  • 🖱️ Ability to place/remove cells with the mouse

🎯 Game Rules

The Game of Life follows simple but fascinating rules:

  1. A living cell with fewer than 2 living neighbors dies (underpopulation)
  2. A living cell with 2 or 3 living neighbors survives
  3. A living cell with more than 3 living neighbors dies (overpopulation)
  4. A dead cell with exactly 3 living neighbors becomes alive (reproduction)

🕹️ Controls

Key Action
Space Pause/Resume simulation
R Reset with random configuration
C Clear all cells
Left click Create/Delete a cell

🔧 Installation

# Clone the repository
git clone https://github.com/your-name/game_of_life.git
cd game_of_life

# Build and run
RUST_BACKTRACE=1 cargo run --package game_of_life --bin game_of_life --features "bevy/dynamic_linking"

🏗️ Project Structure

src/
├── main.rs              # Main entry point
├── ui.rs                # User interface management
└── game_of_life/        # Game logic
    ├── clock.rs         # Time management
    ├── grid.rs          # Grid logic
    ├── mod.rs           # Modules
    └── systems.rs       # Bevy systems

📄 License

This project is under the MIT License. See the LICENSE file for more details.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages