Replace tournament player storage type with lightweight model

This commit is contained in:
Salman Ahmed
2022-06-17 21:03:33 +03:00
parent f3793c8809
commit b977ce7995
8 changed files with 54 additions and 63 deletions

View File

@ -7,7 +7,6 @@ using System;
using System.Linq;
using Newtonsoft.Json;
using osu.Framework.Bindables;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Tournament.Models
{
@ -38,7 +37,7 @@ namespace osu.Game.Tournament.Models
{
get
{
int[] ranks = Players.Select(p => p.Statistics?.GlobalRank)
int[] ranks = Players.Select(p => p.Rank)
.Where(i => i.HasValue)
.Select(i => i.Value)
.ToArray();
@ -59,7 +58,7 @@ namespace osu.Game.Tournament.Models
};
[JsonProperty]
public BindableList<APIUser> Players { get; set; } = new BindableList<APIUser>();
public BindableList<TournamentPlayer> Players { get; set; } = new BindableList<TournamentPlayer>();
public TournamentTeam()
{