Skip to content

Pipes - Tanisha & Bennett - Word guess#6

Open
tanham wants to merge 41 commits intoAda-C8:masterfrom
tanham:master
Open

Pipes - Tanisha & Bennett - Word guess#6
tanham wants to merge 41 commits intoAda-C8:masterfrom
tanham:master

Conversation

@tanham
Copy link

@tanham tanham commented Aug 18, 2017

Word Guess

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
How do you feel you and your partner did in sharing responsibilities? We started by spending a chunk of time planning out our how-to design the program. When we began to code we did a good job communicating and dividing up driving time and researching.
Describe an instance where you used a method for something to encapsulate the functionality within your class. What does it do? What are its inputs and outputs? There is a method called check_letter and it gets and checks user input letter by letter. Inputs = gets, Outputs = pushes letter to either wrong letter array or right letter array && Outputs = current letter to underscore method.
Describe an instance where you used a local variable instead of an instance variable. Why did you make that choice? In the guess_display method we used a local variable called already_guessed to store the string of already guessed letters. We used it because it only needed to be used in one method and not called across methods
What code, if any, did you feel like you were duplicating more than necessary? We think we did a good job of drying up our code
Is there a specific piece of code you'd like feedback on? reference the user_input.rb. Our check_letter method is really long and contains a lot of logic. Should this be parsed into smaller method?

@PilgrimMemoirs
Copy link

Word-Guess Game

What We're Looking For

Feature Feedback
Baseline
Regular Commits with meaningful commit messages. Well Done - great amount of commits with descriptive messages
Readable code with consistent indentation. Well Done
Answered comprehension questions Well Done - see note on check_letter method below
Product Functionalities
Both Teammates contributed to the codebase. Well Done
Created a Class to encapsulate game functionality. Well Done
Used methods to DRY up your code. Mostly good - See DRY note below
Created instance variables & local variables where appropriate. Mostly Good - @current_letter is currently only ever being used in the check_letter method, where having it as a local variable would be more appropriate.
Used Arrays to store lists of letters guessed. Well Done
Used variables & random numbers to allow the game to function with multiple words, no hard-coded answers. Mostly Good - program currently only handle's 5 letter words. What would you have to do to handle letters of various lengths?
Programmed "defensively" to detect errors in user input. Mostly Good - Nice having the option of guessing the whole word, however allows accidentally putting two/multiple letters instead of 1 if not intending to guess full word.
Overall Submission meets project expectations. Nice Work!
Additional Feedback
Class Names UserInput isn't descriptive of the attributes and functionality that class is responsible for Ex: Game and Word are sufficient classnames
check_letter method Good instincts with being concerned on this method containing too much logic. Each conditional could be a method and each chunk of code that is executed based on a conditional could be it's own method. All with method names that are descriptive of the action being performed.
DRY when calling random_word, random_word.word is called many times to perform another string method. RandomWord could have it's own functionality/methods that checks those conditions (this also ties in with cleaning up check_letter method, explained above). Ex: instead of random_word.word.include?(@current_letter), do this random_word.includes_letter?(@current_letter). Instead of random_word.word.join == @current_letter, do this random_word.word_guessed_correctly?(@current_letter) (@current_letter should be renamed to @current_guess if a user can guess a whole word).
Random Word Instance A Game instance should only ever handle one word, therefore it'd be more appropriate to initialize the the game (UserInput class) with the word as an attribute. Pass the word instance as an argument when creating the new UserInput Instance. Same for the AsciiArt

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.

2 participants