Conversation
| end | ||
| end | ||
|
|
||
| def word_pet |
There was a problem hiding this comment.
I see what you did here to separate out the logic for each word. I think you could combine these all into one that would work for any word. You can use the include? method to determine whether the @user_letter is included in the @word or not. Then you could use the index method to retrieve the specific location where that letter is located in the given word.
|
You did a nice job with this! I like the way you've separated some of your logic out into methods -- i think you could even take this a step further. I'd love to see how you can create one big |
Built by Alysia and Mindy.
There are no external dependencies.
Winning the game currently does not end the game as we were unable to invoke our winner_method without having it run each time a letter is guess correctly (thus ending the game too soon). We disabled the winner_method so you pretty much have to guess incorrect letters and lose the game in order to get out of the loops. We're really sad about this ::sigh::