mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-05 06:07:20 +00:00
generatePools has a nicer arity
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
class Pool
|
||||
def generatePools(pools,wrestlers,weight,tournament,matches)
|
||||
@pools = pools
|
||||
def generatePools(weight, tournament, matches)
|
||||
@pools = weight.pools
|
||||
@pool = 1
|
||||
while @pool <= @pools
|
||||
matches = roundRobin(@pool,wrestlers,weight,tournament,matches)
|
||||
@pool = @pool + 1
|
||||
matches = roundRobin(@pool, weight.wrestlers, weight, tournament , matches)
|
||||
@pool += 1
|
||||
end
|
||||
return matches
|
||||
end
|
||||
@@ -27,4 +27,4 @@ class Pool
|
||||
end
|
||||
return matches
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user