Open
Conversation
…s so it would be easier to print the cats and take off Z's. This was done to declutter our workspace so we wouldn't have to keep putsing ASCII cats everywhere.
… print _s that represent the answer. Prompts user to enter a letter.
…f they only added 1 letter. If false, it prompts for user to try again.
…f printing underscores, we made it into an array. Added the good good loop that would continue to run until a single LETTER was entered.
…replaces underscores with correct letter. Added if statement to check if letter had already been guessed.
…me to check if any of it was correct. But we will tomorrow. #fingerscrossed.
….rbgit add word_guess.rbgit add word_guess.rbgit add word_guess.rb Had to move sleepy cat and bike cat into the class as methods because we couldn't access them outside of the class.
…and tested each method as we went on to see if it worked (troubleshooting). Methods to check still are drop_z, make bike cat print, and we might have to add print to some other methods. YAY
…loop. Added if statement. Fixed drop z
…almost runs. Look at comments for what to do monday
…if statement didn't work unless words_and_guessed had been initialized. So instead of initializing words_and_guessed outside AND inside the loop, just added the sentences into intro (without printing) then added words_and_guessed inside the loop. Idk why this works, but it does.
…t wasn't running appropriately. Game is now functionalgit statusgit status WOWgit statusgit status Cleaned up comments.
…guessed_letters had to ignore the last letter entered). Added more animals. Fixed sleepy_cats ear. Everything works (at least we think so).
| "zonkey", "narwhal", "opossum", "emu", "wombat", "duck"].shuffle | ||
| @guessed_letters = [""] | ||
| @letter = letter | ||
| @answer = @words[0] |
There was a problem hiding this comment.
This is a good way to select the first element, another alternative is to use the first method: @words.first
|
@BlueColorPencils @annamw77 - Nice job with this! I think there are a few opportunities to clarify your code a bit with variable and method names. I like the logic and the way that you have logic separated out with methods. |
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.
Anna Wilson and Cristal Tay
No external dependencies.