1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Added 8 man brackets for double elimination

This commit is contained in:
2020-01-24 07:57:51 -05:00
parent 58afc8a485
commit 21b023f195
12 changed files with 303 additions and 36 deletions

View File

@@ -0,0 +1,12 @@
class DoubleEliminationMatchGeneration
def initialize( tournament )
@tournament = tournament
end
def generate_matches
@tournament.weights.each do |weight|
SixteenManDoubleEliminationMatchGeneration.new(weight).generate_matches_for_weight if weight.wrestlers.size >= 9 and weight.wrestlers.size <= 16
EightManDoubleEliminationMatchGeneration.new(weight).generate_matches_for_weight if weight.wrestlers.size >= 4 and weight.wrestlers.size <= 8
end
end
end