fixed compile errors
This commit is contained in:
@@ -69,7 +69,7 @@ struct StatsController: RouteCollection {
|
|||||||
func getStats(matches:[Match]) -> Stats{
|
func getStats(matches:[Match]) -> Stats{
|
||||||
|
|
||||||
let countedMatches = matches.filter {
|
let countedMatches = matches.filter {
|
||||||
return shouldCountMatch(match: $0)
|
return self.shouldCountMatch(match: $0)
|
||||||
}
|
}
|
||||||
|
|
||||||
let totals = countedMatches.reduce([0,0]) { (totals, match) -> [Int] in
|
let totals = countedMatches.reduce([0,0]) { (totals, match) -> [Int] in
|
||||||
@@ -109,7 +109,7 @@ struct StatsController: RouteCollection {
|
|||||||
match.date.day == lastDayPlayed?.day &&
|
match.date.day == lastDayPlayed?.day &&
|
||||||
match.date.month == lastDayPlayed?.month &&
|
match.date.month == lastDayPlayed?.month &&
|
||||||
match.date.year == lastDayPlayed?.year &&
|
match.date.year == lastDayPlayed?.year &&
|
||||||
shouldCountMatch(match: match)
|
self.shouldCountMatch(match: match)
|
||||||
|
|
||||||
if let game = game {
|
if let game = game {
|
||||||
// if game == "mw" {
|
// if game == "mw" {
|
||||||
@@ -555,11 +555,11 @@ struct StatsController: RouteCollection {
|
|||||||
// print ( Date().timeIntervalSince(startTime))
|
// print ( Date().timeIntervalSince(startTime))
|
||||||
|
|
||||||
let mwStats = self.getStatsWithMostRecentDailyRecord(matches: matches.filter({ (match) -> Bool in
|
let mwStats = self.getStatsWithMostRecentDailyRecord(matches: matches.filter({ (match) -> Bool in
|
||||||
return match.codGame == "mw" && shouldCountMatch(match: match )
|
return match.codGame == "mw" && self.shouldCountMatch(match: match )
|
||||||
}))
|
}))
|
||||||
|
|
||||||
let bocwStats = self.getStatsWithMostRecentDailyRecord(matches: matches.filter({ (match) -> Bool in
|
let bocwStats = self.getStatsWithMostRecentDailyRecord(matches: matches.filter({ (match) -> Bool in
|
||||||
return match.codGame == "bocw" && shouldCountMatch(match: match )
|
return match.codGame == "bocw" && self.shouldCountMatch(match: match )
|
||||||
}))
|
}))
|
||||||
let mostRecentDailyStats = self.mostRecentDailyStats(matches: matches)
|
let mostRecentDailyStats = self.mostRecentDailyStats(matches: matches)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user