Class: SeedList::Strategy::Playoff
- Defined in:
- lib/seed_list/strategy.rb
Overview
Best matched against worst, second best against second worst, and so on. Optimized for serious players and viewer entertainment.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from SeedList::Strategy::Base
Instance Method Details
#seed ⇒ Object
29 30 31 32 33 |
# File 'lib/seed_list/strategy.rb', line 29 def seed input, output = @players.clone, [] input.size.times { |i| output << (i.even? ? input.shift : input.pop) } output end |