Class: Rubygoal::Simulator
- Inherits:
-
Object
- Object
- Rubygoal::Simulator
- Extended by:
- Forwardable
- Defined in:
- lib/rubygoal/simulator.rb
Instance Method Summary collapse
-
#initialize ⇒ Simulator
constructor
A new instance of Simulator.
- #simulate ⇒ Object
Constructor Details
Instance Method Details
#simulate ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/rubygoal/simulator.rb', line 15 def simulate time = Time.now while !game.ended? do game.update time += 1.0 / 60.0 Timecop.travel(time) end end |