summaryrefslogtreecommitdiff
path: root/lib/scoring
diff options
context:
space:
mode:
authorAndrewMurrell <amurrel@purdue.edu>2014-04-28 18:29:01 -0400
committerAndrewMurrell <amurrel@purdue.edu>2014-04-28 18:29:01 -0400
commitcd19b2591a52ac604632a70929448ee5e78c2568 (patch)
tree78be624ead45a8b85669f03a04e519a98a283693 /lib/scoring
parent5a7f5f6bc00d2abe2d5cd71363d4d5116bf4de51 (diff)
Misc fixes. (This commit is from Luke on Andrew's box)
Diffstat (limited to 'lib/scoring')
-rw-r--r--lib/scoring/winner_takes_all.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/scoring/winner_takes_all.rb b/lib/scoring/winner_takes_all.rb
index bf95781..57ddae6 100644
--- a/lib/scoring/winner_takes_all.rb
+++ b/lib/scoring/winner_takes_all.rb
@@ -1,13 +1,13 @@
module Scoring
module WinnerTakesAll
def self.stats_needed
- return []
+ return ["win"]
end
def self.score(match, interface)
scores = {}
match.players.each do |player|
- scores[player.user_name] = score_user(match.win?(player))
+ scores[player.user_name] = score_user(player.statistics.where(:match => match, :name => "win").value)
end
scores
end