mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Fixed random seeding
This commit is contained in:
@@ -147,7 +147,7 @@ class Weight < ActiveRecord::Base
|
||||
def randomSeeding
|
||||
wrestlerWithSeeds = wrestlers.select{|w| w.original_seed != nil }.sort_by{|w| w.original_seed}
|
||||
highestSeed = wrestlerWithSeeds.last.original_seed
|
||||
seed = highestSeed
|
||||
seed = highestSeed + 1
|
||||
wrestlersWithoutSeed = wrestlers.select{|w| w.original_seed == nil }
|
||||
wrestlersWithoutSeed.shuffle.each do |w|
|
||||
w.seed = seed
|
||||
|
||||
Reference in New Issue
Block a user