summaryrefslogtreecommitdiff
path: root/lib/scoring_algorithms/Recommended.rb
blob: 8033bd2d791aca2618808d960fe5c81147e84c43 (plain)
1
2
3
4
5
6
7
8
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)
	end
end

#puts Recommended.score(4, true, false)