1
0
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:
RJ Osborne
2015-05-23 06:01:15 -04:00
parent 8177924635
commit 399923b949
2 changed files with 10 additions and 8 deletions

View File

@@ -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