Posts
All the articles I've posted.
-
Introducing ResourceBundle for Player Resources and Expanding Unit Test Coverage
Creating a ResourceBundle class to encapsulate each player's resource cards, using Jackson's @JsonUnwrapped for clean JSON serialization, and mocking random roll results in unit tests with Mockito's MockedStatic.
-
Refactoring Graph Data Structures and Loading Board Layout from Files
Updating CatanGraph to use full GraphNode objects as HashMap keys, adding Hexagons into the graph structure for easier adjacency lookups, and reading hardcoded board adjacency data from JSON resource files instead.
-
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.
-
Two-Phase Player Actions and Angular Event Bubbling Through the Component Tree
Implementing two-phase player actions where clicking an action then requires selecting a board piece, and wiring up Angular event emitters from Settlement through SettlementGrid up to the Board component to handle the selection.
-
API Calls Based on Player Action
Frontend work. Created `PlayerActionService` for handling orchestrating API calls based on the action a user clicks. Implemented this using `Observable<T>` from RxJS, rather than `Promise<T>`.
-
Angular Routing, Login Page, and Wiring Up Player Action Clicks
Building a login landing page, configuring Angular routes between pages, and scaffolding event emitters so player action clicks propagate up the component hierarchy to trigger REST API calls.
-
Interactive Board Pieces with Hover States and Probability Coloring
Adding click and hover event listeners to Settlements, Roads, and Centers, applying a red-to-green gradient on Center pieces to visually represent roll probabilities, and updating player cards to display available actions.