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

Reversed match order for round robin to hopefully move bigger matchups to

later rounds in a bigger pool.
This commit is contained in:
2015-02-09 12:32:50 -05:00
parent 2e7e34125b
commit 2fe11495c6

View File

@@ -10,7 +10,7 @@ class Pool
def twoPools(wrestlers,weight_id,tournament)
pool = 1
wrestlers.sort_by{|x|[x.original_seed]}.each do |w|
wrestlers.sort_by{|x|[x.original_seed]}.reverse.each do |w|
if w.original_seed == 3
w.poolNumber = 2
w.save
@@ -65,7 +65,7 @@ class Pool
def roundRobin(pool,tournament_id,weight_id)
@wrestlers = Wrestler.where(weight_id: weight_id, poolNumber: pool).to_a
@poolMatches = RoundRobinTournament.schedule(@wrestlers)
@poolMatches = RoundRobinTournament.schedule(@wrestlers).reverse
@poolMatches.each_with_index do |b,index|
@bout = b.map
@bout.each do |b|
@@ -80,5 +80,4 @@ class Pool
end
end
end
end