osu/osu.Game.Tournament/Screens/Ladder/Components/TournamentRound.cs

30 lines
998 B
C#
Raw Normal View History

2019-03-04 04:24:19 +00:00
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
2018-09-24 14:30:37 +00:00
using System.Collections.Generic;
2018-10-16 07:07:59 +00:00
using Newtonsoft.Json;
2019-03-02 04:40:43 +00:00
using osu.Framework.Bindables;
2018-09-24 14:30:37 +00:00
namespace osu.Game.Tournament.Screens.Ladder.Components
{
2018-10-16 07:07:59 +00:00
[Serializable]
2019-06-18 05:44:15 +00:00
public class TournamentRound
{
2018-10-12 22:10:13 +00:00
public readonly Bindable<string> Name = new Bindable<string>();
public readonly Bindable<string> Description = new Bindable<string>();
public readonly BindableInt BestOf = new BindableInt(9) { Default = 9, MinValue = 3, MaxValue = 23 };
2018-09-24 14:30:37 +00:00
2018-10-16 07:07:59 +00:00
[JsonProperty]
2019-06-18 05:44:15 +00:00
public readonly List<RoundBeatmap> Beatmaps = new List<RoundBeatmap>();
2018-10-14 09:00:28 +00:00
public readonly Bindable<DateTimeOffset> StartDate = new Bindable<DateTimeOffset>();
// only used for serialisation
2018-09-24 14:30:37 +00:00
public List<int> Pairings = new List<int>();
2018-11-15 05:12:41 +00:00
public override string ToString() => Name.Value ?? "None";
}
}