Class: Minesweeper::GameInitializer

Inherits:
Object
  • Object
show all
Defined in:
lib/minesweeper/game_initializer.rb

Instance Method Summary collapse

Instance Method Details

#restartObject



15
16
17
# File 'lib/minesweeper/game_initializer.rb', line 15

def restart
  play(false)
end

#startObject



5
6
7
8
9
10
11
12
13
# File 'lib/minesweeper/game_initializer.rb', line 5

def start
  init_curses
  Ui.greeting_message
  play
rescue SystemExit, Interrupt
ensure
  close_screen
  at_exit { puts 'good bye' }
end