From f1b2a1f25b839237ff1791ffc4586bc466409874 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 30 Apr 2014 10:52:56 -0400 Subject: remove debug code --- lib/scheduling/elimination.rb | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'lib/scheduling') diff --git a/lib/scheduling/elimination.rb b/lib/scheduling/elimination.rb index 622199c..a2ff989 100644 --- a/lib/scheduling/elimination.rb +++ b/lib/scheduling/elimination.rb @@ -37,7 +37,6 @@ module Scheduling end def finish_match(match) - require 'pp' logBase = match.tournament_stage.tournament.min_teams_per_match matches = match.tournament_stage.matches_ordered cur_match_num = matches.invert[match] @@ -45,10 +44,7 @@ module Scheduling match.winner.matches.push(matches[(cur_match_num+logBase-2)/logBase]) end if matches[(cur_match_num+logBase-2)/logBase].teams.count == match.tournament_stage.tournament.min_teams_per_match - puts(">"*80) - pp matches[(cur_match_num+logBase-2)/logBase].status matches[(cur_match_num+logBase-2)/logBase].update(status: 1) - puts(">"*80) end end @@ -81,20 +77,14 @@ module Scheduling pBase = 1 (1..matches.count).each do |i| matchDepth = Math.log(i*(logBase-1), logBase).floor+1 - puts matchDepth if matchDepth > Math.log(base*(logBase-1), logBase).floor+1 pBase = base base = i end - puts base rh = 100 / (logBase**(depth-1)+1) - 100/height; - puts rh rw = 100/(depth+1) - 5 - puts rw rx = 50/(depth+1) + 100/(depth+1)*(depth-matchDepth) - puts rx ry = 100/(logBase**(matchDepth-1)+1) * (i-base+1) - rh/2 - puts ry str += "\t\n" str += "\t\t