mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-04 22:03:49 +00:00
Refactored names of methods and some db column
This commit is contained in:
@@ -5,7 +5,7 @@ class AdvanceWrestler
|
||||
end
|
||||
|
||||
def advance
|
||||
PoolAdvance.new(@wrestler,@wrestler.lastMatch).advanceWrestler if @tournament.tournament_type == "Pool to bracket"
|
||||
PoolAdvance.new(@wrestler,@wrestler.last_match).advanceWrestler if @tournament.tournament_type == "Pool to bracket"
|
||||
end
|
||||
if Rails.env.production?
|
||||
handle_asynchronously :advance
|
||||
|
||||
@@ -6,10 +6,10 @@ class PoolAdvance
|
||||
end
|
||||
|
||||
def advanceWrestler
|
||||
if @wrestler.weight.allPoolMatchesFinished(@wrestler.pool) && @wrestler.finishedBracketMatches.size == 0
|
||||
if @wrestler.weight.all_pool_matches_finished(@wrestler.pool) && @wrestler.finished_bracket_matches.size == 0
|
||||
poolToBracketAdvancment
|
||||
end
|
||||
if @wrestler.finishedBracketMatches.size > 0
|
||||
if @wrestler.finished_bracket_matches.size > 0
|
||||
bracketAdvancment
|
||||
end
|
||||
end
|
||||
@@ -17,15 +17,15 @@ class PoolAdvance
|
||||
def poolToBracketAdvancment
|
||||
pool = @wrestler.pool
|
||||
if @wrestler.weight.wrestlers.size > 6
|
||||
poolOrder = @wrestler.weight.poolOrder(pool)
|
||||
pool_placement_order = @wrestler.weight.pool_placement_order(pool)
|
||||
#Take pool order and move winner and runner up to correct match based on w1_name and w2_name
|
||||
matches = @wrestler.weight.matches
|
||||
winnerMatch = matches.select{|m| m.loser1_name == "Winner Pool #{pool}" || m.loser2_name == "Winner Pool #{pool}"}.first
|
||||
runnerUpMatch = matches.select{|m| m.loser1_name == "Runner Up Pool #{pool}" || m.loser2_name == "Runner Up Pool #{pool}"}.first
|
||||
winner = poolOrder.first
|
||||
runnerUp = poolOrder.second
|
||||
runnerUpMatch.replaceLoserNameWithWrestler(runnerUp,"Runner Up Pool #{pool}")
|
||||
winnerMatch.replaceLoserNameWithWrestler(winner,"Winner Pool #{pool}")
|
||||
winner = pool_placement_order.first
|
||||
runnerUp = pool_placement_order.second
|
||||
runnerUpMatch.replace_loser_name_with_wrestler(runnerUp,"Runner Up Pool #{pool}")
|
||||
winnerMatch.replace_loser_name_with_wrestler(winner,"Winner Pool #{pool}")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -39,37 +39,37 @@ class PoolAdvance
|
||||
end
|
||||
|
||||
def winnerAdvance
|
||||
if @wrestler.lastMatch.bracket_position == "Quarter"
|
||||
new_match = Match.where("bracket_position = ? AND bracket_position_number = ? AND weight_id = ?","Semis",@wrestler.nextMatchPositionNumber.ceil,@wrestler.weight_id).first
|
||||
if @wrestler.last_match.bracket_position == "Quarter"
|
||||
new_match = Match.where("bracket_position = ? AND bracket_position_number = ? AND weight_id = ?","Semis",@wrestler.next_match_position_number.ceil,@wrestler.weight_id).first
|
||||
updateNewMatch(new_match)
|
||||
end
|
||||
if @wrestler.lastMatch.bracket_position == "Semis"
|
||||
new_match = Match.where("bracket_position = ? AND bracket_position_number = ? AND weight_id = ?","1/2",@wrestler.nextMatchPositionNumber.ceil,@wrestler.weight_id).first
|
||||
if @wrestler.last_match.bracket_position == "Semis"
|
||||
new_match = Match.where("bracket_position = ? AND bracket_position_number = ? AND weight_id = ?","1/2",@wrestler.next_match_position_number.ceil,@wrestler.weight_id).first
|
||||
updateNewMatch(new_match)
|
||||
end
|
||||
if @wrestler.lastMatch.bracket_position == "Conso Semis"
|
||||
new_match = Match.where("bracket_position = ? AND bracket_position_number = ? AND weight_id = ?","5/6",@wrestler.nextMatchPositionNumber.ceil,@wrestler.weight_id).first
|
||||
if @wrestler.last_match.bracket_position == "Conso Semis"
|
||||
new_match = Match.where("bracket_position = ? AND bracket_position_number = ? AND weight_id = ?","5/6",@wrestler.next_match_position_number.ceil,@wrestler.weight_id).first
|
||||
updateNewMatch(new_match)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def updateNewMatch(match)
|
||||
if @wrestler.nextMatchPositionNumber == @wrestler.nextMatchPositionNumber.ceil
|
||||
if @wrestler.next_match_position_number == @wrestler.next_match_position_number.ceil
|
||||
match.w2 = @wrestler.id
|
||||
match.save
|
||||
end
|
||||
if @wrestler.nextMatchPositionNumber != @wrestler.nextMatchPositionNumber.ceil
|
||||
if @wrestler.next_match_position_number != @wrestler.next_match_position_number.ceil
|
||||
match.w1 = @wrestler.id
|
||||
match.save
|
||||
end
|
||||
end
|
||||
|
||||
def loserAdvance
|
||||
bout = @wrestler.lastMatch.bout_number
|
||||
bout = @wrestler.last_match.bout_number
|
||||
next_match = Match.where("(loser1_name = ? OR loser2_name = ?) AND weight_id = ?","Loser of #{bout}","Loser of #{bout}",@wrestler.weight_id)
|
||||
if next_match.size > 0
|
||||
next_match.first.replaceLoserNameWithWrestler(@wrestler,"Loser of #{bout}")
|
||||
next_match.first.replace_loser_name_with_wrestler(@wrestler,"Loser of #{bout}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -13,7 +13,7 @@ class PoolOrder
|
||||
|
||||
def setOriginalPoints
|
||||
@wrestlers.each do |w|
|
||||
w.poolAdvancePoints = w.poolWins.size
|
||||
w.poolAdvancePoints = w.pool_wins.size
|
||||
end
|
||||
end
|
||||
|
||||
@@ -50,7 +50,7 @@ class PoolOrder
|
||||
ifWrestlersWithSamePointsIsSameAsOriginal(originalTieSize) { mostTechs }
|
||||
ifWrestlersWithSamePointsIsSameAsOriginal(originalTieSize) { mostMajors }
|
||||
ifWrestlersWithSamePointsIsSameAsOriginal(originalTieSize) { mostDecisionPointsScored }
|
||||
ifWrestlersWithSamePointsIsSameAsOriginal(originalTieSize) { fastestPin }
|
||||
ifWrestlersWithSamePointsIsSameAsOriginal(originalTieSize) { fastest_pin }
|
||||
ifWrestlersWithSamePointsIsSameAsOriginal(originalTieSize) { coinFlip }
|
||||
end
|
||||
|
||||
@@ -58,7 +58,7 @@ class PoolOrder
|
||||
def headToHead
|
||||
wrestlersWithSamePoints.each do |wr|
|
||||
otherWrestler = wrestlersWithSamePoints.select{|w| w.id != wr.id}.first
|
||||
if wr.matchAgainst(otherWrestler).first.winner_id == wr.id
|
||||
if wr.match_against(otherWrestler).first.winner_id == wr.id
|
||||
addPointsToWrestlersAhead(wr)
|
||||
addPoints(wr)
|
||||
end
|
||||
@@ -79,10 +79,10 @@ class PoolOrder
|
||||
def deductedPoints
|
||||
pointsArray = []
|
||||
wrestlersWithSamePoints.each do |w|
|
||||
pointsArray << w.totalDeductedPoints
|
||||
pointsArray << w.total_points_deducted
|
||||
end
|
||||
leastPoints = pointsArray.min
|
||||
wrestlersWithLeastDeductedPoints = wrestlersWithSamePoints.select{|w| w.totalDeductedPoints == leastPoints}
|
||||
wrestlersWithLeastDeductedPoints = wrestlersWithSamePoints.select{|w| w.total_points_deducted == leastPoints}
|
||||
addPointsToWrestlersAhead(wrestlersWithLeastDeductedPoints.first)
|
||||
wrestlersWithLeastDeductedPoints.each do |wr|
|
||||
addPoints(wr)
|
||||
@@ -92,39 +92,39 @@ class PoolOrder
|
||||
def mostDecisionPointsScored
|
||||
pointsArray = []
|
||||
wrestlersWithSamePoints.each do |w|
|
||||
pointsArray << w.decisionPointsScored
|
||||
pointsArray << w.decision_points_scored
|
||||
end
|
||||
mostPoints = pointsArray.max
|
||||
wrestlersWithMostPoints = wrestlersWithSamePoints.select{|w| w.decisionPointsScored == mostPoints}
|
||||
wrestlersWithMostPoints = wrestlersWithSamePoints.select{|w| w.decision_points_scored == mostPoints}
|
||||
addPointsToWrestlersAhead(wrestlersWithMostPoints.first)
|
||||
wrestlersWithMostPoints.each do |wr|
|
||||
addPoints(wr)
|
||||
end
|
||||
secondPoints = pointsArray.sort[-2]
|
||||
wrestlersWithSecondMostPoints = wrestlersWithSamePoints.select{|w| w.decisionPointsScored == secondPoints}
|
||||
wrestlersWithSecondMostPoints = wrestlersWithSamePoints.select{|w| w.decision_points_scored == secondPoints}
|
||||
addPointsToWrestlersAhead(wrestlersWithSecondMostPoints.first)
|
||||
wrestlersWithSecondMostPoints.each do |wr|
|
||||
addPoints(wr)
|
||||
end
|
||||
end
|
||||
|
||||
def fastestPin
|
||||
def fastest_pin
|
||||
wrestlersWithSamePointsWithPins = []
|
||||
wrestlersWithSamePoints.each do |wr|
|
||||
if wr.pinWins.size > 0
|
||||
if wr.pin_wins.size > 0
|
||||
wrestlersWithSamePointsWithPins << wr
|
||||
end
|
||||
end
|
||||
if wrestlersWithSamePointsWithPins.size > 0
|
||||
fastest = wrestlersWithSamePointsWithPins.sort_by{|w| w.fastestPin.pinTime}.first.fastestPin
|
||||
secondFastest = wrestlersWithSamePointsWithPins.sort_by{|w| w.fastestPin.pinTime}.second.fastestPin
|
||||
wrestlersWithFastestPin = wrestlersWithSamePointsWithPins.select{|w| w.fastestPin.pinTime == fastest.pinTime}
|
||||
fastest = wrestlersWithSamePointsWithPins.sort_by{|w| w.fastest_pin.pin_time_in_seconds}.first.fastest_pin
|
||||
secondFastest = wrestlersWithSamePointsWithPins.sort_by{|w| w.fastest_pin.pin_time_in_seconds}.second.fastest_pin
|
||||
wrestlersWithFastestPin = wrestlersWithSamePointsWithPins.select{|w| w.fastest_pin.pin_time_in_seconds == fastest.pin_time_in_seconds}
|
||||
addPointsToWrestlersAhead(wrestlersWithFastestPin.first)
|
||||
wrestlersWithFastestPin.each do |wr|
|
||||
addPoints(wr)
|
||||
end
|
||||
|
||||
wrestlersWithSecondFastestPin = wrestlersWithSamePointsWithPins.select{|w| w.fastestPin.pinTime == secondFastest.pinTime}
|
||||
wrestlersWithSecondFastestPin = wrestlersWithSamePointsWithPins.select{|w| w.fastest_pin.pin_time_in_seconds == secondFastest.pin_time_in_seconds}
|
||||
addPointsToWrestlersAhead(wrestlersWithSecondFastestPin.first)
|
||||
wrestlersWithSecondFastestPin.each do |wr|
|
||||
addPoints(wr)
|
||||
@@ -135,10 +135,10 @@ class PoolOrder
|
||||
def teamPoints
|
||||
pointsArray = []
|
||||
wrestlersWithSamePoints.each do |w|
|
||||
pointsArray << w.teamPointsEarned
|
||||
pointsArray << w.team_points_earned
|
||||
end
|
||||
mostPoints = pointsArray.max
|
||||
wrestlersWithLeastDeductedPoints = wrestlersWithSamePoints.select{|w| w.teamPointsEarned == mostPoints}
|
||||
wrestlersWithLeastDeductedPoints = wrestlersWithSamePoints.select{|w| w.team_points_earned == mostPoints}
|
||||
addPointsToWrestlersAhead(wrestlersWithLeastDeductedPoints.first)
|
||||
wrestlersWithLeastDeductedPoints.each do |wr|
|
||||
addPoints(wr)
|
||||
@@ -148,10 +148,10 @@ class PoolOrder
|
||||
def mostFalls
|
||||
pointsArray = []
|
||||
wrestlersWithSamePoints.each do |w|
|
||||
pointsArray << w.pinWins.size
|
||||
pointsArray << w.pin_wins.size
|
||||
end
|
||||
mostPoints = pointsArray.max
|
||||
wrestlersWithLeastDeductedPoints = wrestlersWithSamePoints.select{|w| w.pinWins.size == mostPoints}
|
||||
wrestlersWithLeastDeductedPoints = wrestlersWithSamePoints.select{|w| w.pin_wins.size == mostPoints}
|
||||
addPointsToWrestlersAhead(wrestlersWithLeastDeductedPoints.first)
|
||||
wrestlersWithLeastDeductedPoints.each do |wr|
|
||||
addPoints(wr)
|
||||
@@ -161,10 +161,10 @@ class PoolOrder
|
||||
def mostTechs
|
||||
pointsArray = []
|
||||
wrestlersWithSamePoints.each do |w|
|
||||
pointsArray << w.techWins.size
|
||||
pointsArray << w.tech_wins.size
|
||||
end
|
||||
mostPoints = pointsArray.max
|
||||
wrestlersWithLeastDeductedPoints = wrestlersWithSamePoints.select{|w| w.techWins.size == mostPoints}
|
||||
wrestlersWithLeastDeductedPoints = wrestlersWithSamePoints.select{|w| w.tech_wins.size == mostPoints}
|
||||
addPointsToWrestlersAhead(wrestlersWithLeastDeductedPoints.first)
|
||||
wrestlersWithLeastDeductedPoints.each do |wr|
|
||||
addPoints(wr)
|
||||
@@ -174,10 +174,10 @@ class PoolOrder
|
||||
def mostMajors
|
||||
pointsArray = []
|
||||
wrestlersWithSamePoints.each do |w|
|
||||
pointsArray << w.majorWins.size
|
||||
pointsArray << w.major_wins.size
|
||||
end
|
||||
mostPoints = pointsArray.max
|
||||
wrestlersWithLeastDeductedPoints = wrestlersWithSamePoints.select{|w| w.majorWins.size == mostPoints}
|
||||
wrestlersWithLeastDeductedPoints = wrestlersWithSamePoints.select{|w| w.major_wins.size == mostPoints}
|
||||
addPointsToWrestlersAhead(wrestlersWithLeastDeductedPoints.first)
|
||||
wrestlersWithLeastDeductedPoints.each do |wr|
|
||||
addPoints(wr)
|
||||
|
||||
@@ -53,7 +53,7 @@ class GenerateTournamentMatches
|
||||
end
|
||||
|
||||
def moveFinalsMatchesToLastRound
|
||||
finalsRound = @tournament.totalRounds
|
||||
finalsRound = @tournament.total_rounds
|
||||
finalsMatches = @tournament.matches.reload.select{|m| m.bracket_position == "1/2" || m.bracket_position == "3/4" || m.bracket_position == "5/6" || m.bracket_position == "7/8"}
|
||||
finalsMatches. each do |m|
|
||||
m.round = finalsRound
|
||||
@@ -66,7 +66,7 @@ class GenerateTournamentMatches
|
||||
if matsToAssign.count > 0
|
||||
until matsToAssign.sort_by{|m| m.id}.last.matches.count == 4
|
||||
matsToAssign.sort_by{|m| m.id}.each do |m|
|
||||
m.assignNextMatch
|
||||
m.assign_next_match
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -15,9 +15,9 @@ class PoolGeneration
|
||||
end
|
||||
|
||||
def roundRobin
|
||||
wrestlers = @weight.wrestlersForPool(@pool)
|
||||
poolMatches = RoundRobinTournament.schedule(wrestlers).reverse
|
||||
poolMatches.each_with_index do |b, index|
|
||||
wrestlers = @weight.wrestlers_in_pool(@pool)
|
||||
pool_matches = RoundRobinTournament.schedule(wrestlers).reverse
|
||||
pool_matches.each_with_index do |b, index|
|
||||
round = index + 1
|
||||
bouts = b.map
|
||||
bouts.each do |bout|
|
||||
|
||||
@@ -30,14 +30,14 @@ class PoolToBracketMatchGeneration
|
||||
def setOriginalSeedsToWrestleLastPoolRound(weight)
|
||||
pool = 1
|
||||
until pool > weight.pools
|
||||
wrestler1 = weight.poolSeedOrder(pool).first
|
||||
wrestler2 = weight.poolSeedOrder(pool).second
|
||||
match = wrestler1.poolMatches.sort_by{|m| m.round}.last
|
||||
wrestler1 = weight.pool_wrestlers_sorted_by_bracket_line(pool).first
|
||||
wrestler2 = weight.pool_wrestlers_sorted_by_bracket_line(pool).second
|
||||
match = wrestler1.pool_matches.sort_by{|m| m.round}.last
|
||||
if match.w1 != wrestler2.id or match.w2 != wrestler2.id
|
||||
if match.w1 == wrestler1.id
|
||||
SwapWrestlers.new.swapWrestlers(match.w2,wrestler2.id)
|
||||
SwapWrestlers.new.swap_wrestlers_bracket_lines(match.w2,wrestler2.id)
|
||||
elsif match.w2 == wrestler1.id
|
||||
SwapWrestlers.new.swapWrestlers(match.w1,wrestler2.id)
|
||||
SwapWrestlers.new.swap_wrestlers_bracket_lines(match.w1,wrestler2.id)
|
||||
end
|
||||
end
|
||||
pool += 1
|
||||
|
||||
@@ -5,11 +5,11 @@ class GeneratePoolNumbers
|
||||
|
||||
def savePoolNumbers
|
||||
if @weight.pools == 4
|
||||
saveFourPoolNumbers(@weight.wrestlersWithoutPool)
|
||||
saveFourPoolNumbers(@weight.wrestlers_without_pool_assignment)
|
||||
elsif @weight.pools == 2
|
||||
saveTwoPoolNumbers(@weight.wrestlersWithoutPool)
|
||||
saveTwoPoolNumbers(@weight.wrestlers_without_pool_assignment)
|
||||
elsif @weight.pools == 1
|
||||
saveOnePoolNumbers(@weight.wrestlersWithoutPool)
|
||||
saveOnePoolNumbers(@weight.wrestlers_without_pool_assignment)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class CalculateWrestlerTeamScore
|
||||
end
|
||||
|
||||
def earnedPoints
|
||||
return poolPoints + bracketPoints + placementPoints + bonusWinPoints + byePoints
|
||||
return poolPoints + bracketPoints + placement_points + bonusWinPoints + byePoints
|
||||
end
|
||||
|
||||
def deductedPoints
|
||||
@@ -24,17 +24,17 @@ class CalculateWrestlerTeamScore
|
||||
points
|
||||
end
|
||||
|
||||
def placementPoints
|
||||
def placement_points
|
||||
PoolBracketPlacementPoints.new(@wrestler).calcPoints if @tournament.tournament_type == "Pool to bracket"
|
||||
end
|
||||
|
||||
def bracketPoints
|
||||
(@wrestler.championshipAdvancementWins.size * 2) + (@wrestler.consoAdvancementWins.size * 1)
|
||||
(@wrestler.championship_advancement_wins.size * 2) + (@wrestler.consolation_advancement_wins.size * 1)
|
||||
end
|
||||
|
||||
def poolPoints
|
||||
if @tournament.tournament_type == "Pool to bracket"
|
||||
(@wrestler.poolWins.size * 2)
|
||||
(@wrestler.pool_wins.size * 2)
|
||||
else
|
||||
0
|
||||
end
|
||||
@@ -42,7 +42,7 @@ class CalculateWrestlerTeamScore
|
||||
|
||||
def byePoints
|
||||
if @tournament.tournament_type == "Pool to bracket"
|
||||
if @wrestler.poolWins.size >= 1 and @wrestler.hasAPoolBye == true
|
||||
if @wrestler.pool_wins.size >= 1 and @wrestler.has_a_pool_bye == true
|
||||
2
|
||||
else
|
||||
0
|
||||
@@ -53,7 +53,7 @@ class CalculateWrestlerTeamScore
|
||||
end
|
||||
|
||||
def bonusWinPoints
|
||||
(@wrestler.pinWins.size * 2) + (@wrestler.techWins.size * 1.5) + (@wrestler.majorWins.size * 1)
|
||||
(@wrestler.pin_wins.size * 2) + (@wrestler.tech_wins.size * 1.5) + (@wrestler.major_wins.size * 1)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -16,7 +16,7 @@ class PoolBracketPlacementPoints
|
||||
if @bracket == "fourPoolsToSemi"
|
||||
whilePointsAreZero { @points = fourPoolsToSemi }
|
||||
end
|
||||
if @wrestler.weight.wrestlers.size <= 6 && @wrestler.weight.allPoolMatchesFinished(1)
|
||||
if @wrestler.weight.wrestlers.size <= 6 && @wrestler.weight.all_pool_matches_finished(1)
|
||||
whilePointsAreZero { @points = onePool }
|
||||
end
|
||||
return @points
|
||||
@@ -29,11 +29,11 @@ class PoolBracketPlacementPoints
|
||||
end
|
||||
|
||||
def bracket_position_size(bracket_position_name)
|
||||
@wrestler.allMatches.select{|m| m.bracket_position == bracket_position_name}.size
|
||||
@wrestler.all_matches.select{|m| m.bracket_position == bracket_position_name}.size
|
||||
end
|
||||
|
||||
def won_bracket_position_size(bracket_position_name)
|
||||
@wrestler.matchesWon.select{|m| m.bracket_position == bracket_position_name}.size
|
||||
@wrestler.matches_won.select{|m| m.bracket_position == bracket_position_name}.size
|
||||
end
|
||||
|
||||
def fourPoolsToQuarter
|
||||
@@ -67,14 +67,14 @@ class PoolBracketPlacementPoints
|
||||
end
|
||||
|
||||
def onePool
|
||||
poolOrder = @wrestler.weight.poolOrder(1)
|
||||
if @wrestler == poolOrder.first
|
||||
pool_placement_order = @wrestler.weight.pool_placement_order(1)
|
||||
if @wrestler == pool_placement_order.first
|
||||
return firstPlace
|
||||
elsif @wrestler == poolOrder.second
|
||||
elsif @wrestler == pool_placement_order.second
|
||||
return secondPlace
|
||||
elsif @wrestler == poolOrder.third
|
||||
elsif @wrestler == pool_placement_order.third
|
||||
return thirdPlace
|
||||
elsif @wrestler == poolOrder.fourth
|
||||
elsif @wrestler == pool_placement_order.fourth
|
||||
return fourthPlace
|
||||
end
|
||||
return 0
|
||||
|
||||
@@ -2,7 +2,7 @@ class SwapWrestlers
|
||||
attr_accessor :wrestler1_id, :wrestler2_id
|
||||
|
||||
|
||||
def swapWrestlers(wrestler1_id,wrestler2_id)
|
||||
def swap_wrestlers_bracket_lines(wrestler1_id,wrestler2_id)
|
||||
w1 = Wrestler.find(wrestler1_id)
|
||||
w2 = Wrestler.find(wrestler2_id)
|
||||
|
||||
@@ -12,15 +12,15 @@ class SwapWrestlers
|
||||
w3.original_seed = w1.original_seed
|
||||
w3.bracket_line = w1.bracket_line
|
||||
w3.pool = w1.pool
|
||||
swapWrestlerMatches(w1.allMatches,w1.id,w3.id)
|
||||
swapWrestlerMatches(w1.all_matches,w1.id,w3.id)
|
||||
|
||||
#Swap wrestler 1 and wrestler 2
|
||||
swapWrestlerMatches(w2.allMatches,w2.id,w1.id)
|
||||
swapWrestlerMatches(w2.all_matches,w2.id,w1.id)
|
||||
w1.bracket_line = w2.bracket_line
|
||||
w1.pool = w2.pool
|
||||
|
||||
|
||||
swapWrestlerMatches(w3.allMatches,w3.id,w2.id)
|
||||
swapWrestlerMatches(w3.all_matches,w3.id,w2.id)
|
||||
w2.bracket_line = w3.bracket_line
|
||||
w2.pool = w3.pool
|
||||
|
||||
|
||||
Reference in New Issue
Block a user