Open
Conversation
…ank (answer generated) classes interact. No methods added yet to GuessingGame.
…rray to store. Added notes in GuessingGame for tasks that will need to be addressed
…ng number of guesses if wrong
…ut commiting before
…returned string (guess_letter) and array (add_letter_to_guess_array)
Adding play_game method within GamePlay class to run game.
…. Updated loop to run game so it calculates off number of guesses remaining. (from times loop to while loop)
…nosaur , that are not based on a homeland security system
If statement in game play for word_guess?. Updated user prompt to handle "*" so user can indicate when they would like to guess a word. Updated win? to handle different arrays (the all guesses array and an array formed by a word guess depending on the situation)
| intro = "Let's play a word guessing game!!!!" | ||
|
|
||
| puts intro | ||
| @play = GamePlay.new |
There was a problem hiding this comment.
Instance variables are most often useful within classes. Since these variables are not within a class, I think it might make more sense to use local variables (variables without the @)
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.
Deirdre Storck and Sarah Nahmias on this.
Depends on Ruby Gem 'colorize'.
We really tried to use different classes - we thought as the program grew, it would be important to have isolated things like the word getting (which could eventually maybe pull random words from wikipedia or something!), and the user input prompting (which could eventually need to be routed to a phone for a text message word guess... or something.). We wanted practice with classes and to try to understand this concept better.