summaryrefslogtreecommitdiff
path: root/lib/scoring/WinnerTakesAll.rb
blob: ad2471baf43344250c2dfd06bf9268d78eb823f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'ScoringAlgorithm'

class WinnerTakesAll < ScoringAlgorithm

	def self.score(match, interface)
		match.players.each do |player|
			scores[player.user_name] = scoreUser(match.win?(player))
		end
		scores
	end


	def self.score(win)
		win.nil? ? 0.5 : win ? 1 : 0
	end
end