How kenj-1/oop2javaproject works
Project type & purpose (what you’re diagramming)
This is a desktop Java game (single-process) implemented with Java Swing/IntelliJ GUI Designer (*.form + *.java). The game is titled “Encantadia: Echoes of the Gem” and is structured as:
• UI layer: multiple Swing Frames/Dialogs representing screens and flows (welcome → main menu → mode selection → character selection → battle → result/story dialogs).
• Domain layer: characters with stats/behaviors (characters/Character + concrete hero classes).
• Battle engine: turn-based combat with skills, cooldowns, and status effects (battle/TurnManager, Skill, CooldownManager, StatusEffect, TurnResult).
• No explicit server/database; state is in-memory.
File structure (what components exist)
From the tree:
Entry point / bootstrap
• src/encantadia/Main.java
Likely bootstraps the app, initializes UI, starts at welcome or main menu.
Battle engine (core game logic)
• src/encantadia/battle/TurnManager.java
• src/encantadia/battle/TurnResult.java
• src/encantadia/battle/Skill.java
• src/encantadia/battle/CooldownManager.java
• src/encantadia/battle/StatusEffect.java
This is the “combat subsystem” and should be shown as a cohesive component with clear responsibilities:
• Turn sequencing, applying skills, checking cooldowns, applying status effects, producing results for UI.
Domain model (characters)
• src/encantadia/characters/Character.java (base abstraction)
• Concrete classes: Adamus, Dea, Dirk, Flamara, MakelanShere, Mary, Tera, Tyrone etc.
This is the “entity/model subsystem”.
UI / UX screens (Swing)
• src/encantadia/ui/ux/*.java + matching *.form
• WelcomeScreenPage
• MainMenuFrame
• StorylineDialogBox
• CharacterSelectionFrame
• BattleFrame
• ResultDialogFrame
• src/encantadia/ui/ux/gamemodeselection/*:
• ArcadeMode, PVEMode, PVPMode (+ forms)
These are distinct “presentation components” and also define the navigation graph.
README insights to incorporate
The README suggests additional conceptual modules (even if not present in your actual tree):
• docs/mechanics.md (implies rules that map to battle/*)
• Mentions utils/ (Dice, InputValidator, Constants) — not in the provided tree, but if they exist in your local repo, include them as a shared utility component.
Encantadia Desktop App (JVM process) (one big container)
• UI Layer (Swing/IntelliJ Forms)
• WelcomeScreenPage
• MainMenuFrame
• StorylineDialogBox
• GameModeSelection (ArcadeMode / PVEMode / PVPMode)
• CharacterSelectionFrame
• BattleFrame
• ResultDialogFrame
• Game Domain Layer
• Character (base)
• Concrete Characters (Mary, Dirk, etc.)
• (Optional) “Roster/Party” concept if present in code
• Battle Engine
• TurnManager
• Skill
• StatusEffect
• CooldownManager
• TurnResult
• Shared Utilities (only if actually present)
• Dice / RNG
• Input validation
• Constants/config
External dependencies
• Java Swing (javax.swing)
• IntelliJ UI Designer runtime (implied by .form usage)
No database, no network, no microservices—so avoid “server” blocks unless you actually add them.
Architectural patterns present
Even if not explicitly labeled, the project strongly suggests:
• Layering: Presentation (Swing) vs Domain vs Engine.
• Stateful in-memory model: characters and battle state live in objects, no persistence.
• Strategy-like mode branching: Arcade/PVE/PVP as variants of a “game mode” behavior.
• Result object pattern: TurnResult as a structured output from engine → UI (good separation).
Relevant technologies
Explicit labels:
• “Java 8+ (JVM)”
• “Swing UI (IntelliJ GUI Designer .form)”
• If there is any AI logic inside PVE/Arcade (not shown here), label that as “AI Decision Logic”.
• One container: Desktop App (JVM)
• Inside it: UI / Battle / Domain / Utilities
• UI → Battle
• UI → Domain (selection/setup)
• Battle → Domain (mutates state)
• Battle → Utilities (RNG/constants) if present
Pick the core loop: Battle Turn Execution:
If end → ResultDialogFrame
Also produce a smaller UI navigation flow (state machine style) for screens.
Practical “don’t overthink it” decomposition (as many components as possible)
Given this repo, the best “maximally separated but still truthful” breakdown is: