1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-04 13:43:48 +00:00

Added eight pools to quarter final bracket

This commit is contained in:
2018-12-24 13:36:03 +00:00
parent 5b625cb791
commit b2b007bd96
16 changed files with 436 additions and 11 deletions

View File

@@ -93,7 +93,7 @@ class Tournament < ActiveRecord::Base
def pool_to_bracket_weights_with_too_many_wrestlers
if self.tournament_type == "Pool to bracket"
weightsWithTooManyWrestlers = weights.select{|w| w.wrestlers.size > 16}
weightsWithTooManyWrestlers = weights.select{|w| w.wrestlers.size > 24}
if weightsWithTooManyWrestlers.size < 1
return nil
else

View File

@@ -56,6 +56,8 @@ class Weight < ActiveRecord::Base
self.pools = 2
elsif (@wrestlers.size > 10) && (@wrestlers.size <= 16)
self.pools = 4
elsif (@wrestlers.size > 16) && (@wrestlers.size <= 24)
self.pools = 8
end
end
@@ -83,6 +85,8 @@ class Weight < ActiveRecord::Base
return "fourPoolsToQuarter"
elsif self.wrestlers.size > 12 && self.wrestlers.size <= 16
return "fourPoolsToSemi"
elsif self.wrestlers.size > 16 && self.wrestlers.size <= 24
return "eightPoolsToQuarter"
end
end