updated rules on what games count, also can determine most recent record based on game
This commit is contained in:
@@ -25,15 +25,15 @@ struct DataPoint : Content {
|
||||
|
||||
|
||||
final class AllStats: Content {
|
||||
var overall:Stats
|
||||
var mwStats:Stats
|
||||
var bocwStats:Stats
|
||||
var overall:StatsWithMostRecentDailyRecord
|
||||
var mwStats:StatsWithMostRecentDailyRecord
|
||||
var bocwStats:StatsWithMostRecentDailyRecord
|
||||
var byMonth: [MonthStats]
|
||||
var highestWinLossRatio:String
|
||||
var dataPoints:[DataPoint]
|
||||
var mostRecentRecord:String
|
||||
|
||||
init( overall:Stats, mwStats:Stats, bocwStats:Stats, byMonth:[MonthStats], highestWinLossRatio:String, dataPoints:[DataPoint], mostRecentRecord:String) {
|
||||
init( overall:StatsWithMostRecentDailyRecord, mwStats:StatsWithMostRecentDailyRecord, bocwStats:StatsWithMostRecentDailyRecord, byMonth:[MonthStats], highestWinLossRatio:String, dataPoints:[DataPoint], mostRecentRecord:String) {
|
||||
self.overall = overall
|
||||
self.byMonth = byMonth
|
||||
self.highestWinLossRatio = highestWinLossRatio
|
||||
@@ -46,12 +46,12 @@ final class AllStats: Content {
|
||||
}
|
||||
|
||||
final class OverallStats: Content {
|
||||
var overall:Stats
|
||||
var mwStats:Stats
|
||||
var bocwStats:Stats
|
||||
var overall:StatsWithMostRecentDailyRecord
|
||||
var mwStats:StatsWithMostRecentDailyRecord
|
||||
var bocwStats:StatsWithMostRecentDailyRecord
|
||||
var mostRecentRecord:String
|
||||
|
||||
init( overall:Stats, mwStats:Stats, bocwStats:Stats, mostRecentRecord:String){
|
||||
init( overall:StatsWithMostRecentDailyRecord, mwStats:StatsWithMostRecentDailyRecord, bocwStats:StatsWithMostRecentDailyRecord, mostRecentRecord:String){
|
||||
|
||||
self.overall = overall
|
||||
self.mwStats = mwStats;
|
||||
@@ -77,6 +77,7 @@ final class MonthStats: Content {
|
||||
|
||||
}
|
||||
|
||||
|
||||
final class Stats: Content {
|
||||
var winLossRatio:String
|
||||
var totalWins:Int
|
||||
@@ -86,10 +87,25 @@ final class Stats: Content {
|
||||
self.winLossRatio = winLoss
|
||||
self.totalWins = totalWins
|
||||
self.totalLosses = totalLosses
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
final class StatsWithMostRecentDailyRecord: Content {
|
||||
var winLossRatio:String
|
||||
var totalWins:Int
|
||||
var totalLosses:Int
|
||||
var mostRecentRecord:String
|
||||
|
||||
init( winLoss:String, totalWins:Int, totalLosses:Int, mostRecentRecord:String ) {
|
||||
self.winLossRatio = winLoss
|
||||
self.totalWins = totalWins
|
||||
self.totalLosses = totalLosses
|
||||
self.mostRecentRecord = mostRecentRecord
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
final class AllDailyStats: Content {
|
||||
var dailyStats : [DailyStats]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user