Summary
Implement the initial Gameplay bounded-context functionality for game lifecycle setup orchestration and game-ending signaling.
This issue is not the implementation of every responsibility Gameplay may eventually own. Gameplay can later grow into turn orchestration, current-player or current-nation responsibility, winning-condition detection, and final result resolution. Those are future slices and should be tracked by separate GitHub issues when their interface and scope are ready.
This issue focuses on the first lifecycle boundaries: accepting the intent to start a game, coordinating setup work owned by other bounded contexts, moving the game from setup into play once that setup is complete, and providing the lifecycle signal that the game has ended when that fact is determined by the appropriate game-rule flow.
Current Foundation
The current agreed interface covers this lifecycle setup slice:
- Gameplay owns the game identity.
- Gameplay owns canonical nation identity for the Imperial Great Powers.
- Gameplay owns the player roster as a domain concept.
- A game starts through a StartGame intent, not through a separate setup-only command.
- Starting the game puts Gameplay into setup while it coordinates bounded-context initialization.
- Gameplay asks Rondel to set participating nations to their starting positions.
- Gameplay accepts the Rondel setup-complete fact as an inbound event.
- Gameplay records completed initialization work in state.
- When the currently required setup work is complete, Gameplay moves the game into play and publishes SetupCompleted.
The first implementation child issue is #141, and terminal app wiring is #142.
Rule Grounding
Imperial is played with two to six players as investors, while the six Great Powers operate as nations on the board. The rules distinguish player capital from national treasuries, and control of a nation can change through bond ownership. This setup slice should preserve that separation by modeling players, nations, and game lifecycle explicitly.
The rulebook starts play with coordinated setup across the rondel, scoring track, tax chart, factories, bonds, bank, and player or government assignment. In the current architecture, Gameplay coordinates setup completion across bounded contexts rather than owning every setup detail itself.
During play, nations act through the Imperial sequence and the rondel. The full game later ends when a nation reaches the rulebook power-point threshold, with final player outcome based on bonds, nation power factors, and personal cash. This issue includes only the lifecycle signal that the game has ended; detecting the winning condition and resolving final results are acknowledged here as future Gameplay responsibilities.
Desired Outcome
Gameplay answers these lifecycle questions for the current scope:
- Which game is being started?
- Which players are taking part?
- Which canonical nations are in the game?
- Is the game still setting up, or is it in play?
- Which setup responsibilities have been completed by other bounded contexts?
- When is setup complete enough for play to begin?
- What integration event tells the rest of the system that setup is complete?
- What integration event tells the rest of the system that the game has ended?
Out of Scope
- Current player, current nation, turn, or round orchestration.
- Winning-condition detection.
- Final scoring or result resolution.
- Detailed Rondel movement/action rules.
- Detailed Accounting, bond, treasury, or payment rules.
- Detailed map, military, factory, production, import, taxation, or investor behavior.
Scope Guidance
Keep this issue focused on Gameplay lifecycle responsibilities and language. Do not turn it into a code sketch, file checklist, or broad Gameplay implementation plan.
Use child issues for concrete implementation slices. Each child issue should start from a well-defined public interface and proceed one behavior at a time with the preferred red-green-next workflow.
Acceptance Criteria
- Gameplay owns the lifecycle setup concepts for starting a game and entering play.
- Gameplay owns the lifecycle signal that a game has ended.
- The current setup slice is represented by StartGame, setup tracking, Rondel setup acknowledgement, transition to InPlay, and SetupCompleted.
- A future ending slice can publish a game-ended signal without requiring this issue to resolve winning-condition detection or final scoring.
- Older assumptions about CreateGame, EndTurn, bond-assignment command payloads, and GameStarted are removed from this issue.
- Future Gameplay responsibilities are acknowledged only as future issue candidates, not as part of this scope.
- Native GitHub child issues track concrete next steps under this lifecycle issue.
Summary
Implement the initial Gameplay bounded-context functionality for game lifecycle setup orchestration and game-ending signaling.
This issue is not the implementation of every responsibility Gameplay may eventually own. Gameplay can later grow into turn orchestration, current-player or current-nation responsibility, winning-condition detection, and final result resolution. Those are future slices and should be tracked by separate GitHub issues when their interface and scope are ready.
This issue focuses on the first lifecycle boundaries: accepting the intent to start a game, coordinating setup work owned by other bounded contexts, moving the game from setup into play once that setup is complete, and providing the lifecycle signal that the game has ended when that fact is determined by the appropriate game-rule flow.
Current Foundation
The current agreed interface covers this lifecycle setup slice:
The first implementation child issue is #141, and terminal app wiring is #142.
Rule Grounding
Imperial is played with two to six players as investors, while the six Great Powers operate as nations on the board. The rules distinguish player capital from national treasuries, and control of a nation can change through bond ownership. This setup slice should preserve that separation by modeling players, nations, and game lifecycle explicitly.
The rulebook starts play with coordinated setup across the rondel, scoring track, tax chart, factories, bonds, bank, and player or government assignment. In the current architecture, Gameplay coordinates setup completion across bounded contexts rather than owning every setup detail itself.
During play, nations act through the Imperial sequence and the rondel. The full game later ends when a nation reaches the rulebook power-point threshold, with final player outcome based on bonds, nation power factors, and personal cash. This issue includes only the lifecycle signal that the game has ended; detecting the winning condition and resolving final results are acknowledged here as future Gameplay responsibilities.
Desired Outcome
Gameplay answers these lifecycle questions for the current scope:
Out of Scope
Scope Guidance
Keep this issue focused on Gameplay lifecycle responsibilities and language. Do not turn it into a code sketch, file checklist, or broad Gameplay implementation plan.
Use child issues for concrete implementation slices. Each child issue should start from a well-defined public interface and proceed one behavior at a time with the preferred red-green-next workflow.
Acceptance Criteria