Skip to content

Alysia and Mindy - WordGuess#10

Open
abrown152 wants to merge 12 commits intoAda-C5:masterfrom
abrown152:master
Open

Alysia and Mindy - WordGuess#10
abrown152 wants to merge 12 commits intoAda-C5:masterfrom
abrown152:master

Conversation

@abrown152
Copy link
Copy Markdown

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::

Comment thread word_guess.rb
end
end

def word_pet
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kariabancroft
Copy link
Copy Markdown

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 word_ method that could combine the logic that you have in the three separate methods for your words. This would make your code much more extensible if someone wanted to add some new words.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants