diff --git a/app/models/wrestler.rb b/app/models/wrestler.rb index 00a8a21..a41da48 100644 --- a/app/models/wrestler.rb +++ b/app/models/wrestler.rb @@ -27,7 +27,7 @@ class Wrestler < ActiveRecord::Base def teamPointsEarned points = 0.0 - points = points + (poolWins.size * 2) + (pinWins.size * 2) + (techWins.size * 1.5) + (majorWins.size * 1) + placementPoints + points = points + (poolWins.size * 2) + (championshipAdvancementWins.size * 2) + (consoAdvancementWins.size * 1) + (pinWins.size * 2) + (techWins.size * 1.5) + (majorWins.size * 1) + placementPoints end def placementPoints @@ -131,6 +131,14 @@ class Wrestler < ActiveRecord::Base @poolMatches.select{|m| m.poolNumber == self.generatePoolNumber} end + def championshipAdvancementWins + finishedBracketMatches.select{|m| m.bracket_position == "Quarter" or m.bracket_position == "Semis"} + end + + def consoAdvancementWins + finishedBracketMatches.select{|m| m.bracket_position == "Conso Semis"} + end + def finishedMatches allMatches.select{|m| m.finished == 1} end diff --git a/app/views/static_pages/about.html.erb b/app/views/static_pages/about.html.erb index 52f755d..2900bce 100644 --- a/app/views/static_pages/about.html.erb +++ b/app/views/static_pages/about.html.erb @@ -21,6 +21,8 @@
For pool to bracket tournaments, team points will be calculated as follows:
Wins outside of the pool will only get bonus points (for maj tech or fall) and extra placement points. Please note, only brackets with four pools place up to 8. Brackets with 1 or 2 pools only place top 4.
+Finals matches will only recieve extra placement points for placing higher and bonus points for pin, tech, major, etc. Please note, only brackets with four pools place up to 8. Brackets with 1 or 2 pools only place top 4.