2019-03-04 13:24:19 +09: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.
|
2018-09-24 05:19:03 +09:00
|
|
|
|
|
2018-10-14 05:19:50 +09:00
|
|
|
|
using System;
|
2018-09-24 23:30:37 +09:00
|
|
|
|
using System.Collections.Generic;
|
2018-10-16 16:07:59 +09:00
|
|
|
|
using Newtonsoft.Json;
|
2019-03-02 13:40:43 +09:00
|
|
|
|
using osu.Framework.Bindables;
|
2018-09-24 23:30:37 +09:00
|
|
|
|
|
2019-06-18 14:51:48 +09:00
|
|
|
|
namespace osu.Game.Tournament.Models
|
2018-09-24 05:19:03 +09:00
|
|
|
|
{
|
2019-06-18 15:00:33 +09:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// A tournament round, containing many matches, generally executed in a short time period.
|
|
|
|
|
/// </summary>
|
2018-10-16 16:07:59 +09:00
|
|
|
|
[Serializable]
|
2019-06-18 14:44:15 +09:00
|
|
|
|
public class TournamentRound
|
2018-09-24 05:19:03 +09:00
|
|
|
|
{
|
2021-10-08 13:55:20 +09:00
|
|
|
|
public readonly Bindable<string> Name = new Bindable<string>(string.Empty);
|
|
|
|
|
public readonly Bindable<string> Description = new Bindable<string>(string.Empty);
|
2018-09-24 05:19:03 +09:00
|
|
|
|
|
2018-10-14 01:03:04 +09:00
|
|
|
|
public readonly BindableInt BestOf = new BindableInt(9) { Default = 9, MinValue = 3, MaxValue = 23 };
|
2023-11-28 14:56:07 +00:00
|
|
|
|
public readonly BindableInt BanCount = new BindableInt(1) { Default = 1, MinValue = 0, MaxValue = 5 };
|
2018-09-24 23:30:37 +09:00
|
|
|
|
|
2018-10-16 16:07:59 +09:00
|
|
|
|
[JsonProperty]
|
2019-06-18 16:10:23 +09:00
|
|
|
|
public readonly BindableList<RoundBeatmap> Beatmaps = new BindableList<RoundBeatmap>();
|
2018-10-14 18:00:28 +09:00
|
|
|
|
|
2019-06-18 17:59:33 +09:00
|
|
|
|
public readonly Bindable<DateTimeOffset> StartDate = new Bindable<DateTimeOffset> { Value = DateTimeOffset.UtcNow };
|
2018-10-14 05:19:50 +09:00
|
|
|
|
|
2019-06-14 19:16:20 +09:00
|
|
|
|
// only used for serialisation
|
2019-06-18 14:57:05 +09:00
|
|
|
|
public List<int> Matches = new List<int>();
|
2018-11-15 14:12:41 +09:00
|
|
|
|
|
|
|
|
|
public override string ToString() => Name.Value ?? "None";
|
2018-09-24 05:19:03 +09:00
|
|
|
|
}
|
|
|
|
|
}
|