diff options
author | AndrewMurrell <amurrel@purdue.edu> | 2014-04-19 23:31:43 -0400 |
---|---|---|
committer | AndrewMurrell <amurrel@purdue.edu> | 2014-04-19 23:31:43 -0400 |
commit | 4a492f3036ad05718e16289436f9840b4fa5331e (patch) | |
tree | 105d7717ef8c7b28385ec3911f1c0aef3ebf0f42 /lib/scoring_algorithms/Recommended.rb | |
parent | 1512dfafba22473830118db37a55ef42ed2bd0d7 (diff) |
Added some more scoring functions in ScoringAlgorithms.rb
Diffstat (limited to 'lib/scoring_algorithms/Recommended.rb')
-rw-r--r-- | lib/scoring_algorithms/Recommended.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/scoring_algorithms/Recommended.rb b/lib/scoring_algorithms/Recommended.rb index c871fd4..8033bd2 100644 --- a/lib/scoring_algorithms/Recommended.rb +++ b/lib/scoring_algorithms/Recommended.rb @@ -1,4 +1,4 @@ -class Recommended #< ScoringAlgorithm +class Recommended def self.score(votes, win, blowout) fibonacci = Hash.new{ |h,k| h[k] = k < 2 ? k : h[k-1] + h[k-2] } fibonacci[votes+3] + (win ? blowout ? 12 : 10 : blowout ? 5 : 7) |