1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-14 17:06:46 +00:00

Cleaned up a bunch of shit. Depricated model methods and controller methods.

This commit is contained in:
2015-04-15 13:42:12 +00:00
parent 451e6911f8
commit 2b1618c69b
9 changed files with 45 additions and 51 deletions

View File

@@ -4,7 +4,7 @@ class Pool
@pool = 1
while @pool <= @pools
matches = roundRobin(@pool,wrestlers,weight,tournament,matches)
@pool = @pool +1
@pool = @pool + 1
end
return matches
end
@@ -14,13 +14,13 @@ class Pool
@poolMatches = RoundRobinTournament.schedule(@wrestlers).reverse
@poolMatches.each_with_index do |b,index|
@bout = b.map
@bout.each do |b|
if b[0] != nil and b[1] != nil
@bout.each do |bout|
if bout[0] != nil and bout[1] != nil
@match = Matchup.new
@match.w1 = b[0].id
@match.w1_name = b[0].name
@match.w2 = b[1].id
@match.w2_name = b[1].name
@match.w1 = bout[0].id
@match.w1_name = bout[0].name
@match.w2 = bout[1].id
@match.w2_name = bout[1].name
@match.weight_id = weight.id
@match.round = index + 1
@match.weight_max = weight.max