Class: Gitscrub::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/gitscrub/cli.rb

Instance Method Summary collapse

Instance Method Details

#hintObject



20
21
22
23
24
# File 'lib/gitscrub/cli.rb', line 20

def hint
  if level = load_level
    level.show_hint
  end
end

#playObject



11
12
13
14
15
16
# File 'lib/gitscrub/cli.rb', line 11

def play
  UI.word_box("Gitscrub")
  make_directory
  game = Game.new
  game.play_level
end

#resetObject



28
29
30
31
32
33
34
35
# File 'lib/gitscrub/cli.rb', line 28

def reset
  if level = load_level
    UI.word_box("Gitscrub")
    UI.puts("resetting level")
    level.setup_level
    level.full_description
  end
end