1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-06 14:36:59 +00:00

Fixed bug for deducted points and fastest pin. Also added tests to test against those bugs

This commit is contained in:
2019-04-20 11:57:58 -04:00
parent 22e63d3e92
commit 8a9ea7ff35
3 changed files with 177 additions and 10 deletions

View File

@@ -46,7 +46,7 @@ class PoolOrder
def breakTie
originalTieSize = wrestlersWithSamePoints.size
#ifWrestlersWithSamePointsIsSameAsOriginal(originalTieSize) { deductedPoints }
ifWrestlersWithSamePointsIsSameAsOriginal(originalTieSize) { deductedPoints }
if originalTieSize == 2
ifWrestlersWithSamePointsIsSameAsOriginal(originalTieSize) { headToHead }
end
@@ -138,14 +138,6 @@ class PoolOrder
wr.save
addPoints(wr)
end
wrestlersWithSecondFastestPin = wrestlersWithSamePointsWithPins.select{|w| w.fastest_pin.pin_time_in_seconds == secondFastest.pin_time_in_seconds}
addPointsToWrestlersAhead(wrestlersWithSecondFastestPin.first)
wrestlersWithSecondFastestPin.each do |wr|
wr.pool_placement_tiebreaker = "Pin Time"
wr.save
addPoints(wr)
end
end
end