How alizajn/rescue-mission-207 works
Main Components
• Command Center Component: Represented by the central Explorer class in the team’s package (ca.mcmaster.se2aa4.island.team207.Explorer) and the Runner class that integrates with the game arena.
• Decision Modules: The various decision classes (e.g., Stop, FindLand, FlyingToLand, ScanLeft, ScanRight, TurnLeft, TurnRight) which encapsulate the logic for exploration, are grouped under the “Decisions” subpackage.
• Points of Interest (POIs): The POIs package with classes such as CreekResults, Creeks, GetPOIs, etc., handles the discovery and processing of key elements in the map.
• Power Management: The “Power” subpackage (containing Battery, Budget, and Cost) which is likely used to manage energy or resource constraints.
• Auxiliary Components: Other supporting classes like Direction, Position, and Result that facilitate movement, track location, and capture outcomes.
• External Artifacts:
• Maps Directory: Contains input JSON files for the game’s maps.
• Outputs Directory: Where the resulting POIs JSON, transcript JSON, and Explorer.svg are generated.
• Build & Configuration: Maven (pom.xml) for project management, log4j2 configuration (log4j2.xml), and GitHub workflows indicate CI integration.
Relationships and Interactions
• The Runner class serves as the entry point, taking a map file from the maps directory as input, initiating the Explorer.
• The Explorer coordinates with various decision classes to determine the exploration strategy (here, stopping immediately for safety).
• The decision modules are used to decide “what action” to perform at a particular game state, while classes in the POIs package work to calculate and record special points in the game (like creeks or sites).
• Power management classes (Battery, Budget, Cost) may interact with the decision process to ensure that constraints (e.g., fuel consumption or energy budget) are respected.
• Output generation: As the Runner executes the game loop, different outputs are generated, representing the state and progress of the exploration.
Architectural Patterns & Design Principles
• Modular design: The system is built in layers where different concerns are separated (decision logic, POIs discovery, power management).
• Single Responsibility and Separation of Concerns: Each package/component focuses on a specific aspect of the game logic (navigation, analysis, or configuration).
• Command Pattern (implicit): The different decision classes can be seen as commands that encapsulate the actions to be executed.
Relevant Technologies, Frameworks, and Tools
• Java with a Maven build system for dependency management and packaging.
• Log4j2 for logging (indicated by the configuration in resources).
• GitHub Actions (CI/CD configuration in .github/workflows) for automated builds.
• JSON handling for map input and output files.
• Link it to the “Runner” that provides the map input and to the “Decisions” module which branches out into various action classes.
• Explorer’s decisions to the “POIs” and “Power Management” modules to capture environment feedback.