Module: TournamentSystem::Swiss::AcceleratedDutch
- Extended by:
- AcceleratedDutch
- Included in:
- AcceleratedDutch
- Defined in:
- lib/tournament_system/swiss/accelerated_dutch.rb
Overview
A implementation of accelerated (dutch) swiss pairing
Instance Method Summary collapse
-
#pair(driver, options = {}) ⇒ Array<Array(team, team)>
Pair teams using the accelerated (dutch) swiss pairing system.
Instance Method Details
#pair(driver, options = {}) ⇒ Array<Array(team, team)>
Pair teams using the accelerated (dutch) swiss pairing system.
Behaves identical to the dutch pairing system, except that for the first N rounds the top half of the seeded teams is given a point bonus. This makes the first couple rounds of a tournament accelerate 1 round ahead of swiss.
Options are passed to the dutch system and behave identically.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/tournament_system/swiss/accelerated_dutch.rb', line 24 def pair(driver, = {}) acceleration_rounds = [:acceleration_rounds] || 2 acceleration_points = [:acceleration_points] || 1 # Accelerate for the first N rounds by replacing the driver with an accelerated one driver = accelerate_driver(driver, acceleration_points) if Swiss.guess_round(driver) < acceleration_rounds # Do a regular dutch pairing Dutch.pair(driver, ) end |