osu/osu.Game.Tournament/Components/TournamentTeam.cs

47 lines
1.2 KiB
C#
Raw Normal View History

2018-04-13 09:19:50 +00:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2018-10-16 07:07:59 +00:00
using System;
using System.Collections.Generic;
2018-10-16 07:07:59 +00:00
using Newtonsoft.Json;
using osu.Game.Users;
2018-08-25 16:24:19 +00:00
namespace osu.Game.Tournament.Components
2018-04-13 09:19:50 +00:00
{
2018-10-16 07:07:59 +00:00
[Serializable]
public class TournamentTeam
2018-04-13 09:19:50 +00:00
{
/// <summary>
/// The name of this team.
/// </summary>
public string FullName;
private string flagName;
2018-04-13 09:19:50 +00:00
/// <summary>
/// Name of the file containing the flag.
2018-04-13 09:19:50 +00:00
/// </summary>
public string FlagName
{
2019-03-02 04:52:56 +00:00
get => flagName ?? Acronym?.Substring(0, 2);
set => flagName = value;
}
private string acronym;
2018-04-13 09:19:50 +00:00
/// <summary>
/// Short acronym which appears in the group boxes post-selection.
2018-04-13 09:19:50 +00:00
/// </summary>
public string Acronym
{
2019-03-02 04:52:56 +00:00
get => acronym ?? FullName?.Substring(0, 3);
set => acronym = value;
}
2018-10-16 07:07:59 +00:00
[JsonProperty]
public List<User> Players { get; set; } = new List<User>();
2018-09-21 20:52:25 +00:00
public override string ToString() => FullName ?? Acronym;
2018-04-13 09:19:50 +00:00
}
}