Class: Life::CLI::Base
- Inherits:
-
Thor
- Object
- Thor
- Life::CLI::Base
- Includes:
- Thor::Actions
- Defined in:
- lib/life/cli.rb
Instance Method Summary collapse
Instance Method Details
#new ⇒ Object
17 18 19 20 21 22 |
# File 'lib/life/cli.rb', line 17 def new seed = build_seed([:seed]) max_gen = [:generations] world = World.new([:height], [:width], seed) display_simulation max_gen, [:height], world end |
#random ⇒ Object
29 30 31 32 33 34 |
# File 'lib/life/cli.rb', line 29 def random seed = build_random_seed [:width], [:height] max_gen = [:generations] world = World.new([:height], [:width], seed) display_simulation max_gen, [:height], world end |