diff options
author | guntasgrewal <guntasgrewal@gmail.com> | 2014-04-24 21:46:10 -0400 |
---|---|---|
committer | guntasgrewal <guntasgrewal@gmail.com> | 2014-04-24 21:46:10 -0400 |
commit | 86992e85220e9a42ed498497ca733e39fb7266fc (patch) | |
tree | 6615fb03ad255a5b9502892104a5245f40029aa0 /lib/scheduling/elimination.rb | |
parent | f14410d0e7ea249971265f3466ec246c62e6f3f5 (diff) |
seeds and elimination small changes
Diffstat (limited to 'lib/scheduling/elimination.rb')
-rw-r--r-- | lib/scheduling/elimination.rb | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/scheduling/elimination.rb b/lib/scheduling/elimination.rb index 0e93f7a..543df52 100644 --- a/lib/scheduling/elimination.rb +++ b/lib/scheduling/elimination.rb @@ -7,14 +7,6 @@ module Scheduling @tournament_stage = tournament_stage end - def tournament_stage - @tournament_stage - end - - def tournament - self.tournament_stage.tournament - end - def create_matches num_teams = (self.tournament.players.count/self.tournament.min_players_per_team).floor num_matches = (Float(num_teams - tournament.min_teams_per_match)/(tournament.min_teams_per_match - 1)).ceil + 1 @@ -138,5 +130,14 @@ STRING return str end + private + + def tournament_stage + @tournament_stage + end + + def tournament + self.tournament_stage.tournament + end end end |