diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2014-04-23 20:05:30 -0400 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2014-04-23 20:05:30 -0400 |
commit | ae97abc3f47a7209ef8367a5781ca72ada90ddec (patch) | |
tree | c95a6db509218f0c5119856d0e84faa6118b9617 /lib/scoring/marginal_peer.rb | |
parent | a55838983eb101e6f2d6dc3a4a03f5b0d4f36c04 (diff) |
clean up lib/scoring
Diffstat (limited to 'lib/scoring/marginal_peer.rb')
-rw-r--r-- | lib/scoring/marginal_peer.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/scoring/marginal_peer.rb b/lib/scoring/marginal_peer.rb index 0e1cfa8..13e1796 100644 --- a/lib/scoring/marginal_peer.rb +++ b/lib/scoring/marginal_peer.rb @@ -1,15 +1,15 @@ -require 'ScoringAlgorithm' - -class MarginalPeer < ScoringAlgorithm - - def self.score(match, interface) - match.players.each do |player| - scores[player.user_name] = scoreUser(interface.getStatistic(match, player, rating)) +module Scoring + module MarginalPeer + def stats_needed + return [:rating] end - scores - end - def self.score(rating) - rating + def score(match, interface) + scores = {} + match.players.each do |player| + scores[player.user_name] = interface.get_statistic(match, player, :rating) + end + scores + end end -end
\ No newline at end of file +end |