1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
module Scoring module WinnerTakesAll def stats_needed return [] end def score(match, interface) scores = {} match.players.each do |player| scores[player.user_name] = score_user(match.win?(player)) end scores end private def score_user(win) win.nil? ? 0.5 : win ? 1 : 0 end end end