Tag: java
All the articles with the tag "java".
-
Full-Stack Road Placement and Builder Pattern for the FSM
Adding road placement to the Angular frontend by reusing and refactoring existing settlement placement code, while reworking the FSM data structures in Java with a step-based Builder pattern for safer initialization.
-
Implementing Place Road Action and Cleaning Up API Call Logic
Retroactive entry: implementing the 'place road' player action in the backend, refactoring API call logic for reuse across actions, and cleaning up FSM data structures with the builder pattern.
-
Configuring Java Test Tooling and Reaching 44% Code Coverage
Adding Maven surefire and Jacoco plugins for test reports and coverage metrics, then writing the first unit tests for IAction and CatanGraph to bring code coverage from 0% to 44%.
-
Adding the Barter Offer State and Reworking SKIP Action Logic
Introducing TURN_BARTER_OFFER with DTOs and a new REST endpoint, updating SKIP to behave as a true no-op instruction in the FSM, and revisiting the project after a month-long break from Java development.
-
Implementing Turn Roll, Robber, and Barter State Transitions
Adding FSM states and transitions for the full turn-roll flow including paths to TURN_ROBBER and TURN_BARTER, adding victory points and robber position to the game model, and identifying the growing need for unit test coverage.
-
Tracking Player Resources and Collecting Free Starting Resources from Settlements
Extending the Player model with a resource card map and updating PLACE_FREE_SETTLEMENT logic so players automatically collect resources from their second-placed settlement, per Catan rules.
-
Refactoring Hexagon State into a Unified Model
Consolidating hexagon resource type and roll number into a single Hexagon object on both the Java backend and Angular frontend, and working around a TypeScript typing limitation with HashMap-backed dictionaries.
-
Multi-Outcome FSM Transitions and Completing Initial Settlement Placement
Introducing 'Glide' objects to handle FSM actions that can lead to multiple possible next states, then fully implementing the snake-draft PLACE_FREE_SETTLEMENT and PLACE_FREE_ROAD flow so the game can officially begin.