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

Refactored match generation so I can eventually support multiple types of tournaments

This commit is contained in:
2016-05-14 13:28:28 +00:00
parent a763c966d1
commit 2f9c54df2e
14 changed files with 189 additions and 144 deletions

View File

@@ -0,0 +1,19 @@
class WipeTournamentMatches
def initialize( tournament )
@tournament = tournament
end
def setUpMatchGeneration
wipeMatches
resetSchoolScores
end
def wipeMatches
@tournament.matches.destroy_all
end
def resetSchoolScores
@tournament.schools.update_all("score = 0.0")
end
end