module Olympic::Bracket::SingleElimination::Information
General information about the tournament.
@see Base
Public Instance Methods
byes()
click to toggle source
(see Base#byes)
# File lib/olympic/bracket/single_elimination/information.rb, line 32 def byes rounded_teams - @teams.size end
first_round_matches()
click to toggle source
(see Base#first_round_matches)
# File lib/olympic/bracket/single_elimination/information.rb, line 38 def first_round_matches @teams.size - 2 ** Math.log2(@teams.size).floor end
matches()
click to toggle source
(see Base#matches)
# File lib/olympic/bracket/single_elimination/information.rb, line 14 def matches @teams.size - 1 end
rounded_teams()
click to toggle source
(see Base#rounded_teams)
# File lib/olympic/bracket/single_elimination/information.rb, line 26 def rounded_teams 2 ** rounds end
rounds()
click to toggle source
(see Base#rounds)
# File lib/olympic/bracket/single_elimination/information.rb, line 20 def rounds Math.log2(@teams.size).ceil end