mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-06 06:28:33 +00:00
extracted wrestlers_for_pool method
removed unnecessary select
This commit is contained in:
@@ -16,7 +16,7 @@ class Pool
|
||||
|
||||
def roundRobin
|
||||
matches = []
|
||||
wrestlers = @weight.wrestlers.select{|w| w.generatePoolNumber == @pool}.to_a
|
||||
wrestlers = @weight.wrestlers_for_pool(@pool)
|
||||
poolMatches = RoundRobinTournament.schedule(wrestlers).reverse
|
||||
poolMatches.each_with_index do |b, index|
|
||||
round = index + 1
|
||||
|
||||
Reference in New Issue
Block a user