diff options
author | tkimia <tkimia@purdue.edu> | 2014-04-26 16:57:26 -0400 |
---|---|---|
committer | tkimia <tkimia@purdue.edu> | 2014-04-26 16:57:26 -0400 |
commit | 59d8a08232ae7872e2777ac42756fa259e1d1f6f (patch) | |
tree | 7a6f6819ca4d3226f33017c22de1e55a65e1fd6c /lib/scheduling/elimination.rb | |
parent | fedc51fb2d95d1e67c06e560448563a64fa458b1 (diff) | |
parent | 2aaaf29ae291edc34d0512ce9a812fc0de14f76b (diff) |
Merge branch 'master' of https://github.com/LukeShu/leaguer
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 eedeb52..15c33ed 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 |