1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-03 21:33:48 +00:00

Fixed pool order by only getting team points from pool wins and fixing calculating pin time

This commit is contained in:
2024-12-16 00:19:30 -05:00
parent a851436c0c
commit d34fd873c0
3 changed files with 11 additions and 2 deletions

View File

@@ -111,7 +111,7 @@ class Match < ApplicationRecord
sec = time.partition(':').last.to_i
return minutes_in_seconds + sec
else
nil
0
end
end

View File

@@ -38,7 +38,7 @@ class Wrestler < ApplicationRecord
end
def total_pool_points_for_pool_order
CalculateWrestlerTeamScore.new(self).poolPoints + CalculateWrestlerTeamScore.new(self).bonusWinPoints
CalculateWrestlerTeamScore.new(self).poolPoints + CalculateWrestlerTeamScore.new(self).pool_bonus_points
end
def unfinished_pool_matches
@@ -260,6 +260,7 @@ class Wrestler < ApplicationRecord
def pin_time_pool
time = 0
pin_wins.select{|m| m.bracket_position == "Pool"}.each do | m |
puts m.pin_time_in_seconds
time = time + m.pin_time_in_seconds
end
time