Class: Playoffs::RandomSimulator
- Inherits:
-
Object
- Object
- Playoffs::RandomSimulator
- Extended by:
- T::Sig
- Includes:
- Simulator
- Defined in:
- lib/playoffs/random_simulator.rb
Overview
Very simple example of how to select a winner for a series.
Instance Method Summary collapse
Instance Method Details
#pick(series) ⇒ Object
13 14 15 16 17 |
# File 'lib/playoffs/random_simulator.rb', line 13 def pick(series) index = rand(0..1) T.must(series.teams[index]) end |