1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Added most decision points and quickest pin to the tiebreakers

This commit is contained in:
2015-12-17 14:03:14 +00:00
parent ae056ec7f8
commit 702a52311b
4 changed files with 159 additions and 0 deletions

View File

@@ -27,6 +27,17 @@ class Match < ActiveRecord::Base
""
end
end
def pinTime
if self.win_type == "Pin"
time = self.score.delete("")
minInSeconds = time.partition(':').first.to_i * 60
sec = time.partition(':').last.to_i
return minInSeconds + sec
else
nil
end
end
def advance_wrestlers
if self.w1 && self.w2