1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-26 07:56:57 +00:00

Random seeding now works

This commit is contained in:
2015-12-30 16:21:56 +00:00
parent 6ed2bdf547
commit 74577eb9ec
11 changed files with 131 additions and 21 deletions

View File

@@ -1,6 +1,8 @@
module GeneratesTournamentMatches
def generateMatchups
resetSchoolScores
setSeedsAndRandomSeedingWrestlersWithoutSeeds
poolToBracket() if tournament_type == "Pool to bracket"
matches
end
@@ -9,7 +11,6 @@ module GeneratesTournamentMatches
end
def poolToBracket
resetSchoolScores
destroyAllMatches
buildTournamentWeights
generateMatches
@@ -39,5 +40,11 @@ module GeneratesTournamentMatches
m.save
end
end
def setSeedsAndRandomSeedingWrestlersWithoutSeeds
weights.each do |w|
w.setSeeds
end
end
end