MatchPairing -> TournamentMatch

This commit is contained in:
Dean Herbert
2019-06-18 14:57:05 +09:00
parent 96e24ebd20
commit da20904a57
22 changed files with 228 additions and 228 deletions

View File

@ -7,6 +7,6 @@ namespace osu.Game.Tournament.Models
{
public class LadderEditorInfo
{
public readonly Bindable<MatchPairing> Selected = new Bindable<MatchPairing>();
public readonly Bindable<TournamentMatch> Selected = new Bindable<TournamentMatch>();
}
}

View File

@ -9,7 +9,7 @@ namespace osu.Game.Tournament.Models
{
public class LadderInfo
{
public BindableList<MatchPairing> Pairings = new BindableList<MatchPairing>();
public BindableList<TournamentMatch> Matches = new BindableList<TournamentMatch>();
public BindableList<TournamentRound> Rounds = new BindableList<TournamentRound>();
public BindableList<TournamentTeam> Teams = new BindableList<TournamentTeam>();
@ -17,6 +17,6 @@ namespace osu.Game.Tournament.Models
public List<TournamentProgression> Progressions = new List<TournamentProgression>();
[JsonIgnore]
public Bindable<MatchPairing> CurrentMatch = new Bindable<MatchPairing>();
public Bindable<TournamentMatch> CurrentMatch = new Bindable<TournamentMatch>();
}
}

View File

@ -15,7 +15,7 @@ namespace osu.Game.Tournament.Models
/// A collection of two teams competing in a head-to-head match.
/// </summary>
[Serializable]
public class MatchPairing
public class TournamentMatch
{
public int ID;
@ -54,10 +54,10 @@ namespace osu.Game.Tournament.Models
public readonly Bindable<TournamentRound> Round = new Bindable<TournamentRound>();
[JsonIgnore]
public readonly Bindable<MatchPairing> Progression = new Bindable<MatchPairing>();
public readonly Bindable<TournamentMatch> Progression = new Bindable<TournamentMatch>();
[JsonIgnore]
public readonly Bindable<MatchPairing> LosersProgression = new Bindable<MatchPairing>();
public readonly Bindable<TournamentMatch> LosersProgression = new Bindable<TournamentMatch>();
/// <summary>
/// Should not be set directly. Use LadderInfo.CurrentMatch.Value = this instead.
@ -67,17 +67,17 @@ namespace osu.Game.Tournament.Models
public readonly Bindable<DateTimeOffset> Date = new Bindable<DateTimeOffset>();
[JsonProperty]
public readonly BindableList<ConditionalMatchPairing> ConditionalPairings = new BindableList<ConditionalMatchPairing>();
public readonly BindableList<ConditionalTournamentMatch> ConditionalMatches = new BindableList<ConditionalTournamentMatch>();
public readonly Bindable<Point> Position = new Bindable<Point>();
public MatchPairing()
public TournamentMatch()
{
Team1.BindValueChanged(t => Team1Acronym = t.NewValue?.Acronym.Value, true);
Team2.BindValueChanged(t => Team2Acronym = t.NewValue?.Acronym.Value, true);
}
public MatchPairing(TournamentTeam team1 = null, TournamentTeam team2 = null)
public TournamentMatch(TournamentTeam team1 = null, TournamentTeam team2 = null)
: this()
{
Team1.Value = team1;

View File

@ -22,7 +22,7 @@ namespace osu.Game.Tournament.Models
public readonly Bindable<DateTimeOffset> StartDate = new Bindable<DateTimeOffset>();
// only used for serialisation
public List<int> Pairings = new List<int>();
public List<int> Matches = new List<int>();
public override string ToString() => Name.Value ?? "None";
}