1
0
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:
2015-11-16 13:31:27 +00:00
parent 34a04be4bf
commit 934ccc28ee
9 changed files with 199 additions and 26 deletions

View File

@@ -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