mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-05-18 11:08:27 +00:00
removed the matches argument to generatePools and roundRobin
This commit is contained in:
@@ -27,11 +27,11 @@ class Tournamentmatchgen
|
||||
|
||||
def buildTournamentWeights
|
||||
@tournament.weights.sort_by{|x|[x.max]}.each do |weight|
|
||||
@matches = Pool.new.generatePools(weight, @tournament.id, @matches)
|
||||
weight_matches = @matches.select{|m| m.weight_id == weight.id }
|
||||
matches = Pool.new.generatePools(weight, @tournament.id)
|
||||
weight_matches = matches.select{|m| m.weight_id == weight.id }
|
||||
last_match = weight_matches.sort_by{|m| m.round}.last
|
||||
highest_round = last_match.round
|
||||
@matches = Poolbracket.new.generateBracketMatches(@matches, weight, highest_round)
|
||||
@matches += Poolbracket.new.generateBracketMatches(matches, weight, highest_round)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user