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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user