Class: SeedList::Strategy::Playoff

Inherits:
Base
  • Object
show all
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

#players

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from SeedList::Strategy::Base

Instance Method Details

#seedObject



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