lib/hangman/game.rb
# loads Word object and resumes game loop with start_game method
loads Word object and resumes game loop with start_game method
loads Word object and resumes game loop with start_game method
def load_game
      if File.exist?('data.pstore')
        store = PStore.new('data.pstore')
        store.transaction do
          @playing_word = store[:saved_game]
        end
        puts 'Game loaded successfully!'
        start_game
      else
        puts 'No saved game found.'
        puts ''
      end
    end
def load_game if File . exist? ( 'data.pstore' ) store = PStore . new ( 'data.pstore' ) store . transaction do @playing_word = store [ :saved_game ] end puts 'Game loaded successfully!' start_game else puts 'No saved game found.' puts '' end end
loads Word object and resumes game loop with start_game method
loads Word object and resumes game loop with start_game method