Skip to content

Commit

Permalink
Allow finishing the game during all non-paused stages
Browse files Browse the repository at this point in the history
  • Loading branch information
g3force committed Apr 24, 2022
1 parent 9e0b16c commit 16b3a2d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/refereeState.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ export let getNextStage = function (stage) {
};

export let canEndGameFromStage = function (stage) {
return stage === 'NORMAL_SECOND_HALF'
|| stage === 'EXTRA_SECOND_HALF'
|| stage === 'PENALTY_SHOOTOUT';
// Games can always end when a team has scored 10 goals, so we only restrict it to non paused stages
return isNonPausedStage(stage);
};

export let isNonPausedStage = function (state) {
Expand Down

0 comments on commit 16b3a2d

Please sign in to comment.