diff --git a/readme.md b/readme.md index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..62e34699c4828e3ea84fdd5ce28253605b24e809 100644 --- a/readme.md +++ b/readme.md @@ -0,0 +1,82 @@ +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). + +