mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-10 07:48:29 +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:
@@ -10,7 +10,7 @@ class Pool
|
|||||||
|
|
||||||
def twoPools(wrestlers,weight_id,tournament)
|
def twoPools(wrestlers,weight_id,tournament)
|
||||||
pool = 1
|
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
|
if w.original_seed == 3
|
||||||
w.poolNumber = 2
|
w.poolNumber = 2
|
||||||
w.save
|
w.save
|
||||||
@@ -65,7 +65,7 @@ class Pool
|
|||||||
|
|
||||||
def roundRobin(pool,tournament_id,weight_id)
|
def roundRobin(pool,tournament_id,weight_id)
|
||||||
@wrestlers = Wrestler.where(weight_id: weight_id, poolNumber: pool).to_a
|
@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|
|
@poolMatches.each_with_index do |b,index|
|
||||||
@bout = b.map
|
@bout = b.map
|
||||||
@bout.each do |b|
|
@bout.each do |b|
|
||||||
@@ -80,5 +80,4 @@ class Pool
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user