Tag: angular
All the articles with the tag "angular".
-
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.
-
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.
-
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.