Open
Conversation
…tter provided, otherwise leave as is
tildeee
reviewed
Aug 28, 2017
| "Nope! Hint: You can get a gallon of it at Trader Joe’s, but I doubt it’s organic.", | ||
| "That’s not niche enough." | ||
| ] | ||
| puts "This hang-man game is elite and invite-only (requires a password).\nHow do you take your vegan chai?" |
There was a problem hiding this comment.
I LOVE THIS.
At first I didn't know the answer and typed "hot...?"
tildeee
reviewed
Aug 28, 2017
|
|
||
| def reveal(guess) | ||
| counter = 0 #keeps track of random_word array index number | ||
| @changed = nil |
There was a problem hiding this comment.
It would probably be fine to set @changed to false instead of nil
Word-Guess GameWhat We're Looking For
|
|
Great project! The project is great, looks good, and is fun. Regarding your questions on feedback around lines 12-24: your intuition is right, using |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Word Guess
Congratulations! You're submitting your assignment.
Comprehension Questions
attr_readers were set accordingly.guessis the local variable. It's used that way so we would limit its scope to the block within theplaymethod.guessis provided by the user.random_wordhere and there because that is the faker-generated word and it needed to be used for comparison in a loop.countervariable in order to refer to an index of an array. I wonder if there are any enumerable methods (.map?) that could make this a bit prettier/more efficient. .