add lobby rating to home
add gametype (WIP) to home misc UI tweaks
This commit is contained in:
@ -28,5 +28,6 @@ namespace SharedLibraryCore.Dtos
|
||||
public string LastConnectionText => (DateTime.UtcNow - LastConnection).HumanizeForCurrentCulture();
|
||||
public IDictionary<int, long> LinkedAccounts { get; set; }
|
||||
public MetaType? MetaFilterType { get; set; }
|
||||
public double? ZScore { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -23,5 +23,21 @@ namespace SharedLibraryCore.Dtos
|
||||
public string IPAddress { get; set; }
|
||||
public bool IsPasswordProtected { get; set; }
|
||||
public string Endpoint => $"{IPAddress}:{Port}";
|
||||
|
||||
public double? LobbyZScore
|
||||
{
|
||||
get
|
||||
{
|
||||
var valid = Players.Where(player => player.ZScore != null && player.ZScore != 0)
|
||||
.ToList();
|
||||
|
||||
if (!valid.Any())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return Math.Round(valid.Select(player => player.ZScore.Value).Average(), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user