Module: TournamentSystem::Algorithm::PagePlayoff
- Extended by:
- PagePlayoff
- Included in:
- PagePlayoff
- Defined in:
- lib/tournament_system/algorithm/page_playoff.rb
Overview
This module provides algorithms for dealing with the page playoff system.
Constant Summary collapse
- TOTAL_ROUNDS =
The total number of rounds needed for all page playoff tournaments.
3
Instance Method Summary collapse
-
#guess_round(matches_count) ⇒ Integer
Guess the next round (starting at 0) for page playoff.
Instance Method Details
#guess_round(matches_count) ⇒ Integer
Guess the next round (starting at 0) for page playoff.
25 26 27 28 29 30 31 |
# File 'lib/tournament_system/algorithm/page_playoff.rb', line 25 def guess_round(matches_count) round = MATCH_ROUND_MAP[matches_count] raise ArgumentError, 'Invalid number of matches' unless round round end |