1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Added logic for 32 man bracket

This commit is contained in:
2024-12-23 22:12:44 -05:00
parent 4f0f69223d
commit 13bb8067fb
8 changed files with 513 additions and 93 deletions

View File

@@ -168,7 +168,7 @@ 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 > 16}
weights_with_too_many_wrestlers = weights.select{|w| w.wrestlers.size > 32}
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."