-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kat and Luxi - Word Guess - Octos #5
base: master
Are you sure you want to change the base?
Conversation
… and consolidate method
…WordMechanics object as an initialize argument.
… guessed letter is included in the current word. Increment wrong guess counter if it is not.
… word array. We used the index to replace the underscore in letter holder with the correct guessed letter.
… at the same time.
…m to screen once user has made an incorrect guess
…working out the details. Added case-statements to handle wrong guesses.
…d fixed the play again bug.
… into a string so it was displayed better.
…he user does not guess the correct letter the current word underscore will print.
Word-Guess GameWhat We're Looking For
|
guess_ui = GuessMechanics.new(new_word) | ||
guess_ui.guess_letter | ||
puts "\nDo you want to play again?" | ||
@play_again = gets.chomp.downcase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put this into a loop that will repeat until the user picks "yes" or "no." Instead anything other than "yes" will cause the program to stop.
print @letter_holders.join(' ') | ||
else | ||
puts "Oooh, that sucks. You entered the wrong letter. Draw more TROGDOR!" | ||
print @letter_holders.join(' ') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might move this puts outside the if/else block
Word Guess
Congratulations! You're submitting your assignment.
Comprehension Questions