@@ -270,23 +270,25 @@ type GameEventProposal struct {
270270
271271// State of the game
272272type State struct {
273- Stage Stage `json:"stage"`
274- Command RefCommand `json:"command"`
275- CommandFor Team `json:"commandForTeam"`
276- GameEvents []* GameEvent `json:"gameEvents"`
277- StageTimeElapsed time.Duration `json:"stageTimeElapsed"`
278- StageTimeLeft time.Duration `json:"stageTimeLeft"`
279- MatchTimeStart time.Time `json:"matchTimeStart"`
280- MatchDuration time.Duration `json:"matchDuration"`
281- TeamState map [Team ]* TeamInfo `json:"teamState"`
282- Division config.Division `json:"division"`
283- PlacementPos * Location `json:"placementPos"`
284- AutoContinue bool `json:"autoContinue"`
285- NextCommand RefCommand `json:"nextCommand"`
286- NextCommandFor Team `json:"nextCommandFor"`
287- AutoRefsConnected []string `json:"autoRefsConnected"`
288- GameEventBehavior map [GameEventType ]GameEventBehavior `json:"gameEventBehavior"`
289- GameEventProposals []* GameEventProposal `json:"gameEventProposals"`
273+ Stage Stage `json:"stage"`
274+ Command RefCommand `json:"command"`
275+ CommandFor Team `json:"commandForTeam"`
276+ GameEvents []* GameEvent `json:"gameEvents"`
277+ StageTimeElapsed time.Duration `json:"stageTimeElapsed"`
278+ StageTimeLeft time.Duration `json:"stageTimeLeft"`
279+ MatchTimeStart time.Time `json:"matchTimeStart"`
280+ MatchDuration time.Duration `json:"matchDuration"` // MatchDuration contains the updated match duration based on MatchTimeStart for the UI
281+ TeamState map [Team ]* TeamInfo `json:"teamState"`
282+ Division config.Division `json:"division"`
283+ PlacementPos * Location `json:"placementPos"`
284+ AutoContinue bool `json:"autoContinue"`
285+ NextCommand RefCommand `json:"nextCommand"`
286+ NextCommandFor Team `json:"nextCommandFor"`
287+ AutoRefsConnected []string `json:"autoRefsConnected"`
288+ GameEventBehavior map [GameEventType ]GameEventBehavior `json:"gameEventBehavior"`
289+ GameEventProposals []* GameEventProposal `json:"gameEventProposals"`
290+ LackOfProgressDeadline time.Time `json:"lackOfProgressDeadline"`
291+ LackOfProgressTimeRemaining time.Duration `json:"lackOfProgressTimeRemaining"` // LackOfProgressTimeRemaining contains the updated remaining lack of progress time for the UI
290292}
291293
292294// NewState creates a new state, initialized for the start of a new game
@@ -300,6 +302,7 @@ func NewState() (s *State) {
300302 s .StageTimeElapsed = 0
301303 s .MatchDuration = 0
302304 s .MatchTimeStart = time .Unix (0 , 0 )
305+ s .LackOfProgressDeadline = time .Unix (0 , 0 )
303306
304307 s .TeamState = map [Team ]* TeamInfo {}
305308 s .TeamState [TeamYellow ] = new (TeamInfo )
0 commit comments