Class: Shiritori::CLI

Inherits:
Thor show all
Defined in:
lib/shiritori/cli.rb

Constant Summary collapse

GAME_MODE =
[:easy, :normal]

Instance Method Summary collapse

Instance Method Details

#startObject



7
8
9
10
11
12
13
14
15
# File 'lib/shiritori/cli.rb', line 7

def start
  mode = (options[:mode])? options[:mode].to_sym : :normal

  if GAME_MODE.include?(mode)
    Main.new.start(mode: mode)
  else
    puts "Mode is not only easy or normal."
  end
end