Task: [Integrate with End-of-Day Event].
Feature: [Win Lose Checking] (#114)
This task involves integrating the win/lose checking functionality with the end-of-day event, which is triggered by the DayNightService. The win/lose check should occur at the end of each day to evaluate the player's progress based on specific game variables such as total money (gold) and should occur directly after the MoralDecisionDisplay is shown. The system will determine if a win or loss condition is met, and then trigger the appropriate win/lose state.
Example (optional)
At the end of each day, the player’s total gold is compared to pre-set thresholds. If the player’s total gold exceeds or meets the win condition threshold, they win. If their gold falls below the lose condition threshold, they lose. Currently, the game is designed for a one-day cycle, but future expansions may include multi-day scenarios.
Dependencies
[x] Dependency on DayNightService
[x] Dependency on MoralDecisionDisplay
Milestones
List of steps that need to be completed for this task.
[x] Implement checkEndOfDayGameState() into ForestGameArea (Sept. 10).
[x] Listen for Moral Decision Display to conclude, triggering "endGame" event in DayNightService (Sept. 10).
[x] Listen for "endGame" event in ForestGameArea within create() and trigger checkEndOfDayGameState() (Sept. 10).
[x] Test win/lose states are trigger appropriately at the end of the 'day' (Sept. 11).
Description
Task: [Integrate with End-of-Day Event]. Feature: [Win Lose Checking] (#114)
This task involves integrating the win/lose checking functionality with the end-of-day event, which is triggered by the DayNightService. The win/lose check should occur at the end of each day to evaluate the player's progress based on specific game variables such as total money (gold) and should occur directly after the MoralDecisionDisplay is shown. The system will determine if a win or loss condition is met, and then trigger the appropriate win/lose state.
Example (optional)
Dependencies
Milestones
List of steps that need to be completed for this task.
Completion Deadline: Sept. 11
Documentation
Member