diff --git a/src/Turnierplan.Core/Tournament/Match.cs b/src/Turnierplan.Core/Tournament/Match.cs index dba269a7..3714f104 100644 --- a/src/Turnierplan.Core/Tournament/Match.cs +++ b/src/Turnierplan.Core/Tournament/Match.cs @@ -82,17 +82,9 @@ internal Match(int id, int index, TeamSelectorBase teamSelectorA, TeamSelectorBa public void SetOutcome(bool isCurrentlyPlaying, int scoreA, int scoreB, MatchOutcomeType outcomeType) { - if (!isCurrentlyPlaying) + if (!isCurrentlyPlaying && IsDecidingMatch && scoreA == scoreB) { - if (IsDecidingMatch && scoreA == scoreB) - { - throw new TurnierplanException("Deciding matches cannot end with a draw."); - } - - if (outcomeType == MatchOutcomeType.AfterPenalties && scoreA == scoreB) - { - throw new TurnierplanException($"When outcome type is '{nameof(MatchOutcomeType.AfterPenalties)}', the match may not be a draw."); - } + throw new TurnierplanException("Deciding matches cannot end with a draw."); } IsCurrentlyPlaying = isCurrentlyPlaying;