lib/hangerman/game.rb
# Displays word with underscores & guessed letters.
Displays word with underscores & guessed letters.
Displays word with underscores & guessed letters .
def word_with_blanks
    word_with_blanks = []
    @word.split('').each do |letter|
      if !@letters_guessed.include?(letter)
        word_with_blanks << '_'
      else
        word_with_blanks << letter
      end
    end
    word_with_blanks.join(' ')
  end
def word_with_blanks word_with_blanks = [ ] @word . split ( '' ) . each do | letter | if ! @letters_guessed . include? ( letter ) word_with_blanks << '_' else word_with_blanks << letter end end word_with_blanks . join ( ' ' ) end
Displays word with underscores & guessed letters.
Displays word with underscores & guessed letters .