diff options
author | tkimia <tkimia@purdue.edu> | 2014-04-29 16:41:35 -0400 |
---|---|---|
committer | tkimia <tkimia@purdue.edu> | 2014-04-29 16:41:35 -0400 |
commit | 42d6e3b1cc05ef5172081682b53675e4827254d3 (patch) | |
tree | 240743892a6f0948774f1b89bf5bf58ed49f6416 /lib/scoring/winner_takes_all.rb | |
parent | 0d6f7a3bfbf4c87510a1bcf967b618f98e149d49 (diff) |
elimination works SOMETIMES... other times it just can't put down a damned winner
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 |