Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FirefighterStarter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CHERCHEM Sarah
FirefighterStarter
Commits
a09c56d6
Commit
a09c56d6
authored
6 months ago
by
CHERCHEM Sarah
Browse files
Options
Downloads
Patches
Plain Diff
complete the readme file
parent
6a2fdffd
No related branches found
No related tags found
No related merge requests found
Pipeline
#42939
passed
6 months ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
readme.md
+82
-0
82 additions, 0 deletions
readme.md
with
82 additions
and
0 deletions
readme.md
+
82
−
0
View file @
a09c56d6
Firefighter Automaton Simulator
Authors: Sarah Cherchem, Celia Arezki
Project Type: Automaton Simulation
Description:
This project simulates a grid-based environment featuring firefighters, fires, clouds, and terrain types.
It models a dynamic scenario where firefighters extinguish fires while considering various obstacles and conditions,
adhering to object-oriented design principles and the SOLID methodology.
Project Structure
The project is divided into several key classes, each with a specific role. Below is an overview of the main classes:
**1. FirefighterBoard**
Purpose: The main board class managing all elements and their interactions on the grid.
Key Responsibilities:
Initializes grid dimensions and elements (fire, firefighters, clouds, etc.).
Manages state transitions and interactions between elements.
Implements the logic for adding or resetting elements on the board.
**2. BoardFireFighterBehavior**
Purpose: Encapsulates behaviors and actions of elements on the board.
Key Responsibilities:
Tracks positions of various elements (e.g., fires, firefighters, clouds).
Provides logic for initializing and updating the board’s state.
**3. BoardFirefighterProperties**
Purpose: Stores properties such as the number of rows and columns of the board.
Key Responsibilities:
Maintains static configurations of the grid.
Provides properties to other components for consistent configuration.
**4. ModelElement (Abstract Class)**
Purpose: Represents any entity that can exist on the board.
Key Responsibilities:
Serves as a base class for all elements (e.g., fire, firefighter, cloud).
**5. Fire**
Purpose: Represents a fire entity on the board.
Key Responsibilities:
Interacts with firefighters or other elements.
Can be extinguished under specific conditions.
**6. DefaultFireFighter**
Purpose: Represents a firefighter on the board.
Key Responsibilities:
Moves across the grid and extinguishes fires.
Works in coordination with other firefighters or motorized units.
**7. MotorizedFireFighter**
Purpose: Represents a motorized firefighter.
Key Responsibilities:
Moves faster and has enhanced capabilities compared to regular firefighters.
Extinguishes fires in complex terrains.
**8. Cloud**
Purpose: Represents clouds that interact with fires and potentially hinder firefighters.
Key Responsibilities:
Can reduce the spread of fire or obstruct visibility.
**9. Rocky**
Purpose: Represents rocky terrain.
Key Responsibilities:
Affects the movement of firefighters and other elements.
**10. Factories (e.g., FireFactory, FirefighterFactory, CloudFactory, etc.)**
Purpose: Encapsulates the creation of board elements.
Key Responsibilities:
Generates elements with random or predefined configurations.
Ensures consistent initialization.
**11. Utilities**
*
*
Position:
Represents coordinates on the grid.
Provides utility methods for comparing and managing positions.
Neighbors:
Used to initialize neighboring positions for efficient traversal and interactions.
Features
Dynamic Board Initialization:
Adjustable dimensions and element counts (e.g., number of fires, firefighters).
Real-Time Interaction:
Elements dynamically interact based on their properties and behaviors.
Customizable Terrains:
Includes obstacles like rocky terrain and roads.
How to Run
Compile all classes in the src directory.
Run the main method in the appropriate driver class to initialize the simulation.
Observe the board’s dynamic behavior in the console or GUI.
Future Enhancements
Introduce advanced terrain types like rivers or forests.
Add AI-driven firefighter behaviors for complex decision-making.
Visualize the simulation using a graphical interface (JavaFX or other frameworks).
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment