1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-10 23:53:06 +00:00

Created integration test for poolbracket matchups

This commit is contained in:
2015-03-27 12:52:35 +00:00
parent 819d735480
commit 4b6b20c912
5 changed files with 94 additions and 6 deletions

View File

@@ -31,10 +31,10 @@ class Tournament < ActiveRecord::Base
def generateMatchups
@matches = []
self.weights.map.sort_by{|x|[x.max]}.each do |weight|
@upcomingMatches = weight.generateMatchups(@matches)
@matches = weight.generateMatchups(@matches)
end
@upcomingMatches = assignBouts(@upcomingMatches)
return @upcomingMatches
@matches = assignBouts(@matches)
return @matches
end
def assignBouts(matches)