Open
Conversation
Instance variable @word gets a random word from an existing word list using a get_word method. Tests that a word object can be created and a word randomly assigned to it.
…rray. Pushed used letters into the empty array. Added rules, got user letter input.
… the display_word method.
…word method to include a call to add_to_wrong_letters.
…d regex to check if it's a letter. Updated list of words.
…plicate letters in the wrong_letters array
…s for formatting. Made pretty
…ted regex to only use characters.
…ent. Created method to do that.
…, repeat letter added. highlighted game board, added a word.
| def get_word #using this method to use in initialize to call array | ||
| list_of_words = ["development", "digestion", "window", "yesterday", "separate", "disease", "carriage", "punishment", "transport", "tomorrow", "instrument", "competition", "representative", | ||
| "achievement", "stomach", "observation", "tendency", "building", "business", "attention", "attraction", "behavior", "questionnaire", "susceptible", "lollipop", "elephant", "hotdog", "awesome", | ||
| "kilometer", "treasure", "dominoes", "electricity", "lightsaber", "battery", "circumference", "eloquent", "impeccable", "meticulous", "predilection", "superfluous", "vociferous", "zenith"].shuffle #shuffle the array so it's different each time |
There was a problem hiding this comment.
I see the .shuffle call at the end here, but it would be easier to read if you added this method call on a separate line below
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.
Adriana Cannon and Lisa Rolczynski worked on this.
Requires the following gems: colorize, rainbow, and artii.
Our game has "easy" or "normal" mode. Easy mode provides all the vowels in the word.