How alejoordonez02/algodefense works
Main Components
• Application Entry Point: Highlight the Main.java and SystemInfo.java in the edu.fiuba.algo3 package as the starting point for the application.
• Controllers: Include a “Controllers” layer representing classes such as ControladorBotonDefensas, ControladorBotonJugar, ControladorJuego, etc. These are responsible for handling user actions and game events.
• Model: Show the “Model” layer which comprises game entities like Jugador, Juego, Defensa, Enemigo, Mapa, Parcela, Torre, and other domain classes. Note how some classes implement behaviors (e.g., strategies like CaminarSobrePasarela and movement interfaces such as Movedor).
• Views: Represent the “Views” layer with UI classes from the vistas package like VistaJuego, VistaMapa, VistaDefensas, and more. This layer deals with the graphical or textual presentation of the game state.
• Repositories: Represent the persistence layer containing repository classes such as JsonEnemyRepository and JsonMapRepository that load configuration or game data from JSON files.
• External & Utility Components: Include external scripts (build.sh, package.sh, etc.), Docker configuration (Dockerfile and docker-compose.yaml), and the build system (pom.xml, dependency-reduced-pom.xml) as part of the deployment and infrastructure tooling.
Depicting Relationships and Interactions
• That the model communicates with the repositories for updating or loading game configuration (from JSON files).
• That the Main class at start-up initiates the controllers and views, kickstarting the event loop.
• Optionally, point out integration points with Docker and CI/CD (via .github and travis configurations) to show the complete lifecycle from development to deployment.
Architectural Patterns and Design Principles
• MVC pattern: Clearly separate the Model (business logic), the Controllers (input processing and game rules), and the Views (presentation). Include a note that the “diagramaMVC.puml” is a documented artifact of this design.
• Layered architecture that supports clean separation of concerns.
Relevant Technologies and Frameworks
• Java is the primary language, with Maven for builds (pom.xml) and standard Java packages arranged under edu.fiuba.algo3.
• Docker is used for deployment, as evidenced by the docker folder and associated scripts.
• Testing frameworks are also present (multiple tests under src/main/test) to verify proper functionality.