mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-05 06:07:20 +00:00
Deducted points pool tie breaker added
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
class School < ActiveRecord::Base
|
||||
belongs_to :tournament
|
||||
has_many :wrestlers, dependent: :destroy
|
||||
has_many :deductedPoints, through: :wrestlers
|
||||
|
||||
|
||||
#calculate score here
|
||||
@@ -8,4 +9,60 @@ class School < ActiveRecord::Base
|
||||
#Add score per wrestler. Calculate score in wrestler model.
|
||||
return 0
|
||||
end
|
||||
|
||||
def calcScore
|
||||
#calc and save score
|
||||
end
|
||||
|
||||
def totalDeductedPoints
|
||||
points = 0
|
||||
self.deductedPoints.each do |d|
|
||||
points = points + d.points
|
||||
end
|
||||
points
|
||||
end
|
||||
|
||||
def poolWins
|
||||
|
||||
end
|
||||
|
||||
def pinDefaultDqWins
|
||||
|
||||
end
|
||||
|
||||
def techFallWins
|
||||
|
||||
end
|
||||
|
||||
def majorWins
|
||||
|
||||
end
|
||||
|
||||
def firstPlace
|
||||
|
||||
end
|
||||
|
||||
def secondPlace
|
||||
|
||||
end
|
||||
|
||||
def thirdPlace
|
||||
|
||||
end
|
||||
|
||||
def fourthPlace
|
||||
|
||||
end
|
||||
|
||||
def fifthPlace
|
||||
|
||||
end
|
||||
|
||||
def sixthPlace
|
||||
|
||||
end
|
||||
|
||||
def seventhPlace
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user