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

Fixed random seeding

This commit is contained in:
2016-01-13 03:44:56 +00:00
parent faa4300335
commit a757c8a777

View File

@@ -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