Class: Rsb::Gol::Cli
- Inherits:
-
Thor
- Object
- Thor
- Rsb::Gol::Cli
- Defined in:
- lib/rsb/gol/cli.rb
Instance Method Summary collapse
Instance Method Details
#start ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rsb/gol/cli.rb', line 14 def start columns, rows = HighLine::SystemExtensions.terminal_size rows -= 10 columns -= 10 iterations = .iterations alive = .alive_char dead = .death_char columns = .columns if .columns? rows = .rows if .rows? # ✺ ☻ ⬣ ● ⨀ game = Rsb::Gol::Game.new(cols: columns, rows: rows) game.start(iterations, alive, dead) end |