Add helper method to get winning team colour

This commit is contained in:
Dean Herbert 2020-03-06 16:03:34 +09:00
parent 3caffb81e1
commit 129c8fe24f

View File

@ -90,6 +90,8 @@ namespace osu.Game.Tournament.Models
[JsonIgnore] [JsonIgnore]
public TournamentTeam Loser => !Completed.Value ? null : Team1Score.Value > Team2Score.Value ? Team2.Value : Team1.Value; public TournamentTeam Loser => !Completed.Value ? null : Team1Score.Value > Team2Score.Value ? Team2.Value : Team1.Value;
public TeamColour WinnerColour => Winner == Team1.Value ? TeamColour.Red : TeamColour.Blue;
public int PointsToWin => Round.Value?.BestOf.Value / 2 + 1 ?? 0; public int PointsToWin => Round.Value?.BestOf.Value / 2 + 1 ?? 0;
/// <summary> /// <summary>