diff options
Diffstat (limited to 'lib/scoring/winner_takes_all.rb')
-rw-r--r-- | lib/scoring/winner_takes_all.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/scoring/winner_takes_all.rb b/lib/scoring/winner_takes_all.rb index 9c83fb9..c807cba 100644 --- a/lib/scoring/winner_takes_all.rb +++ b/lib/scoring/winner_takes_all.rb @@ -1,22 +1,16 @@ module Scoring module WinnerTakesAll def self.stats_needed - #return ["win"] - ["win", "numDeaths", "turretsKilled", "championsKilled", "minionsKilled", "assists"] + return ["win"] end def self.score(match) scores = {} match.users.each do |user| stats = Statistic.where(user: user, match: match) - scores[user] = score_user(stats.where(name: "win").first.value) + scores[user] = stats.where(name: "win").first.value ? 1 : 0 end scores end - - private - def self.score_user(win) - win.nil? ? 0.5 : win ? 1 : 0 - end end end |