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

Updated seeding logic for double elim to make byes truly random and to keep bracket lines consistent through match generations

This commit is contained in:
2024-12-23 16:17:43 -05:00
parent 6242100e01
commit 7e6d7ddfbb
8 changed files with 213 additions and 55 deletions

View File

@@ -155,7 +155,7 @@ class Weight < ApplicationRecord
wrestlers.select{|w| w.pool == nil}
end
def calculate_bracket_size()
def calculate_bracket_size
num_wrestlers = wrestlers.reload.size
return nil if num_wrestlers <= 0 # Handle invalid input