mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-12 16:25:41 +00:00
Added eight pools to quarter final bracket
This commit is contained in:
@@ -20,6 +20,8 @@ class PoolBracketGeneration
|
||||
return fourPoolsToQuarter()
|
||||
elsif @pool_bracket_type == "fourPoolsToSemi"
|
||||
return fourPoolsToSemi()
|
||||
elsif @pool_bracket_type == "eightPoolsToQuarter"
|
||||
return eightPoolsToQuarter()
|
||||
end
|
||||
return []
|
||||
end
|
||||
@@ -66,6 +68,23 @@ class PoolBracketGeneration
|
||||
createMatchup("", "", "7/8", 1)
|
||||
end
|
||||
|
||||
def eightPoolsToQuarter()
|
||||
createMatchup("Winner Pool 1", "Winner Pool 8", "Quarter", 1)
|
||||
createMatchup("Winner Pool 4", "Winner Pool 5", "Quarter", 2)
|
||||
createMatchup("Winner Pool 2", "Winner Pool 7", "Quarter", 3)
|
||||
createMatchup("Winner Pool 3", "Winner Pool 6", "Quarter", 4)
|
||||
next_round
|
||||
createMatchup("", "", "Semis", 1)
|
||||
createMatchup("", "", "Semis", 2)
|
||||
createMatchup("", "", "Conso Semis", 1)
|
||||
createMatchup("", "", "Conso Semis", 2)
|
||||
next_round
|
||||
createMatchup("", "", "1/2", 1)
|
||||
createMatchup("", "", "3/4", 1)
|
||||
createMatchup("", "", "5/6", 1)
|
||||
createMatchup("", "", "7/8", 1)
|
||||
end
|
||||
|
||||
def createMatchup(w1_name, w2_name, bracket_position, bracket_position_number)
|
||||
@tournament.matches.create(
|
||||
loser1_name: w1_name,
|
||||
|
||||
@@ -7,7 +7,7 @@ class PoolToBracketGenerateLoserNames
|
||||
matches_by_weight = @tournament.matches.where(weight_id: weight.id)
|
||||
if weight.pool_bracket_type == "twoPoolsToSemi"
|
||||
twoPoolsToSemiLoser(matches_by_weight)
|
||||
elsif weight.pool_bracket_type == "fourPoolsToQuarter"
|
||||
elsif (weight.pool_bracket_type == "fourPoolsToQuarter") or (weight.pool_bracket_type == "eightPoolsToQuarter")
|
||||
fourPoolsToQuarterLoser(matches_by_weight)
|
||||
elsif weight.pool_bracket_type == "fourPoolsToSemi"
|
||||
fourPoolsToSemiLoser(matches_by_weight)
|
||||
@@ -20,8 +20,8 @@ class PoolToBracketGenerateLoserNames
|
||||
@tournament.weights.each do |w|
|
||||
matches_by_weight = @tournament.matches.where(weight_id: w.id)
|
||||
if w.pool_bracket_type == "twoPoolsToSemi"
|
||||
twoPoolsToSemiLoser(matches_by_weight)
|
||||
elsif w.pool_bracket_type == "fourPoolsToQuarter"
|
||||
twoPoolsToSemiLoser(matches_by_weight)
|
||||
elsif (w.pool_bracket_type == "fourPoolsToQuarter") or (w.pool_bracket_type == "eightPoolsToQuarter")
|
||||
fourPoolsToQuarterLoser(matches_by_weight)
|
||||
elsif w.pool_bracket_type == "fourPoolsToSemi"
|
||||
fourPoolsToSemiLoser(matches_by_weight)
|
||||
|
||||
Reference in New Issue
Block a user