lib/hangman/word.rb
# checks to see if guess of letter was correct
checks to see if guess of letter was correct
checks to see if guess of letter was correct
def correct_guess?(letter)
      if @word_selected.include?(letter)
        if @correct_guesses.empty?
          @correct_guesses << letter
        elsif @correct_guesses.include?(letter)
          puts 'Letter already guessed! try another one!'
        else
          @correct_guesses << letter
        end
        return true
      end
      false
    end
def correct_guess? ( letter ) if @word_selected . include? ( letter ) if @correct_guesses . empty? @correct_guesses << letter elsif @correct_guesses . include? ( letter ) puts 'Letter already guessed! try another one!' else @correct_guesses << letter end return true end false end
checks to see if guess of letter was correct
checks to see if guess of letter was correct
letter
<not_specific>