Posts
All the articles I've posted.
-
Implementing Resource Collection from Dice Rolls for All Players
Updating RollAction to query CatanGraphService for settlements adjacent to the rolled hexagons and distributing the correct resources to each player's ResourceBundle after every dice roll.
-
Introducing Integration Tests and Improving Action and Transition Coverage
Scaffolding a Java integration test structure that makes real HTTP requests against the controller, adding the first Transition tests, and using try-with-resources for clean MockedStatic teardown between tests.
-
Expanding Test Coverage to Multiple Actions and the Spring Controller
Using ChatGPT to scaffold unit tests for multiple Action classes and the CatanController, and investigating unexpected Spring request body serialization behavior with @RequestBody and custom DTOs.
-
Writing Unit Tests for PlaceSettlementAction
Writing unit tests for PlaceSettlementAction by thinking through meaningful test cases, setting up game state fixtures, and using ChatGPT to scaffold new test files based on existing IAction test patterns.
-
Implementing the New FSM Transition Design with Regression Testing
Translating existing States, Glides, and Transitions into the simplified Transition-first FSM design, introducing ActionEnum.NOOP for free transitions, and manually regression testing the results through CLI automation scripts.
-
Simplifying the FSM by Removing Glides and Adopting ActionEnum.NOOP
Redesigning the Finite State Machine to eliminate Glides and StateBase, representing free transitions with ActionEnum.NOOP, and adopting a strategy-pattern ActionEnum that delegates to concrete action implementations.
-
Printing the FSM Definition at Startup and Discovering a Design Code Smell
Adding startup logging to print all FSM transitions for visibility, then uncovering a design smell where Glides duplicate information from parent Actions—motivating a refactor that removes StateBase and replaces Glides with enriched Transitions.
-
Improving CatanGraph Test Coverage and Catching a HashMap Overwrite Bug
Expanding CatanGraph unit tests to cover all branches, overriding equals and hashCode on ResourceBundle for readable assertions, and discovering a real bug where Road adjacency entries were silently overwritten by Hexagon entries in a HashMap.