mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Added support for 64 man brackets
This commit is contained in:
@@ -157,10 +157,10 @@ class Tournament < ApplicationRecord
|
||||
def double_elim_number_of_wrestlers_error
|
||||
error_string = ""
|
||||
if self.tournament_type == "Double Elimination 1-6" or self.tournament_type == "Double Elimination 1-8"
|
||||
weights_with_too_many_wrestlers = weights.select{|w| w.wrestlers.size > 32}
|
||||
weights_with_too_many_wrestlers = weights.select{|w| w.wrestlers.size > 64}
|
||||
weight_with_too_few_wrestlers = weights.select{|w| w.wrestlers.size < 4}
|
||||
weights_with_too_many_wrestlers.each do |weight|
|
||||
error_string = error_string + " The weight class #{weight.max} has more than 16 wrestlers."
|
||||
error_string = error_string + " The weight class #{weight.max} has more than 64 wrestlers."
|
||||
end
|
||||
weight_with_too_few_wrestlers.each do |weight|
|
||||
error_string = error_string + " The weight class #{weight.max} has less than 4 wrestlers."
|
||||
|
||||
Reference in New Issue
Block a user