blob: f2c02723ddd53476b785b1c262d751b9c2f45bf5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
module Scoring
module MarginalPeer
def self.stats_needed(match)
return ["rating", "win"]
end
def self.score(match)
scores = {}
match.users.each do |user|
stats = Statistic.where(user: user, match: match)
scores[user] = stats.where(name: "rating").first.value
end
scores
end
end
end
|