Skip to content

Cristal & Anna WordGuess Game#5

Open
annamm77 wants to merge 17 commits intoAda-C5:masterfrom
BlueColorPencils:master
Open

Cristal & Anna WordGuess Game#5
annamm77 wants to merge 17 commits intoAda-C5:masterfrom
BlueColorPencils:master

Conversation

@annamm77
Copy link
Copy Markdown

Anna Wilson and Cristal Tay

No external dependencies.

BlueColorPencils and others added 17 commits February 25, 2016 13:24
…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
…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).
Comment thread word_guess.rb
"zonkey", "narwhal", "opossum", "emu", "wombat", "duck"].shuffle
@guessed_letters = [""]
@letter = letter
@answer = @words[0]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is a good way to select the first element, another alternative is to use the first method: @words.first

@kariabancroft
Copy link
Copy Markdown

@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.

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