From 577f203243b1ac914a3ee3f4635005be06d637c6 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Tue, 29 Apr 2014 14:49:50 -0400 Subject: Fixed peer review sampling and scoring. --- lib/scoring/winner_takes_all.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/scoring/winner_takes_all.rb') diff --git a/lib/scoring/winner_takes_all.rb b/lib/scoring/winner_takes_all.rb index 9c83fb9..5fc188a 100644 --- a/lib/scoring/winner_takes_all.rb +++ b/lib/scoring/winner_takes_all.rb @@ -1,15 +1,14 @@ 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] = score_user(stats.where(name: "win").first) end scores end -- cgit v1.2.3-2-g168b From eed512268e4e0a0b7c5f9dddd6e36773fbee6bad Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Tue, 29 Apr 2014 16:11:57 -0400 Subject: scoring accepts matches --- lib/scoring/winner_takes_all.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/scoring/winner_takes_all.rb') diff --git a/lib/scoring/winner_takes_all.rb b/lib/scoring/winner_takes_all.rb index 5fc188a..db494c6 100644 --- a/lib/scoring/winner_takes_all.rb +++ b/lib/scoring/winner_takes_all.rb @@ -1,6 +1,6 @@ module Scoring module WinnerTakesAll - def self.stats_needed + def self.stats_needed(match) return ["win"] end -- cgit v1.2.3-2-g168b