Skip to content

jsnaz/fire-forest-propagation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Forest Fire Propagation

The objective of this project is to model and visualize the fire propagation in a forest.
The forests are build randomly, one of the trees get randomly set on fire and the interface (both CLI and GUI) will display the fire propagation evolution step by step.

GUI

forest-fire-gui

CLI

forest-fire-cli

OOP Architecture

class_diagram

The project core algorithm is done in the Forest class. It is an abstract class. The Forest class create a grid of Tree objects and manage the fire propagation.
The display part of the project is done in the ForestCli and ForestGui classes. They both inherit from the Forest class (parent).
The display and algorithm parts are separated. That way we can modify the algorithm or the CLI/GUI without impacting the others parts of the program.

Run the program

In order to run the program, you first need to create a Python virtual environment and install the necessary libraries:

Create virtual environment

python3 -m venv env

Activate the virtual environment

source env/bin/activate

Install Python libraries

pip install -r requirements.txt

Run the simulation for both the CLI and GUI

cd src
python main.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages