player count stats

This commit is contained in:
Michael Simard
2021-01-18 07:55:55 -06:00
parent ce46570099
commit 5f6d96137b
4 changed files with 51 additions and 6 deletions

View File

@@ -117,6 +117,8 @@ final class Stats: Content {
return (Double(totalWins) / Double(deno)).truncate(places: 3)
}
}
final class StatsWithMostRecentDailyRecord: Content {

View File

@@ -78,6 +78,13 @@ final class Match: Model, Content {
}
var playerList:[Int] {
return players?.components(separatedBy: ",").map({ (playerId) -> Int in
(Int(playerId.trimmingCharacters(in: .whitespaces) ) ?? -1)
}) ?? []
}
}
extension Match {