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

Extras do not score points but still get tie breaker criteria

This commit is contained in:
2015-12-30 15:13:09 +00:00
parent 1bfa09d47d
commit 6ed2bdf547
3 changed files with 25 additions and 3 deletions

View File

@@ -130,10 +130,10 @@ class PoolOrder
def teamPoints
pointsArray = []
wrestlersWithSamePoints.each do |w|
pointsArray << w.totalTeamPoints
pointsArray << w.teamPointsEarned
end
mostPoints = pointsArray.max
wrestlersWithLeastDeductedPoints = wrestlersWithSamePoints.select{|w| w.totalTeamPoints == mostPoints}
wrestlersWithLeastDeductedPoints = wrestlersWithSamePoints.select{|w| w.teamPointsEarned == mostPoints}
addPointsToWrestlersAhead(wrestlersWithLeastDeductedPoints.first)
wrestlersWithLeastDeductedPoints.each do |wr|
addPoints(wr)