Skip to content

Comments

Pipes - Irene - Mariana - Word_Guess#8

Open
idevera wants to merge 3 commits intoAda-C8:masterfrom
idevera:master
Open

Pipes - Irene - Mariana - Word_Guess#8
idevera wants to merge 3 commits intoAda-C8:masterfrom
idevera:master

Conversation

@idevera
Copy link

@idevera idevera 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? Sometimes it is complicated because you have to explain to your partner what exactly type. It was a new experience for both of us to be able to explain our thoughts without typing!
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? We used a method that checks if a user guess has previously been guessed. The input is a letter and the output is a letter. We loop over an array that includes all the input letters and if the user has already guessed it, we ask for another input.
Describe an instance where you used a local variable instead of an instance variable. Why did you make that choice? We used a local variable to capture all the strings in an array and to output a single string return. We used this to display the current guess
What code, if any, did you feel like you were duplicating more than necessary? Under the show_letters method and the underscore method, we could have just called the show_letters method instead of typing it all out in the underscore method
Is there a specific piece of code you'd like feedback on? HOW DO YOU PRINT AN ASCII PROPERLY???

@PilgrimMemoirs
Copy link

Word-Guess Game

What We're Looking For

Feature Feedback
Baseline
Regular Commits with meaningful commit messages. Needs improvement - Started strong, should have continued to commit with each new thing, like a feature/method.
Readable code with consistent indentation. Well Done
Answered comprehension questions Well Done - In this case, all methods are being called in the interface (of main.rb), so none of them are encapsulated. I'm not sure what you tried for printing Ascii, but there are some gems out there that could help.
Product Functionalities
Both Teammates contributed to the codebase. Well Done
Created a Class to encapsulate game functionality. Mostly Good - there are more opportunities to encapsulate functionality. See note below.
Used methods to DRY up your code. Well Done
Created instance variables & local variables where appropriate. Well Done
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. Well Done
Programmed "defensively" to detect errors in user input. Well Done
Overall Submission meets project expectations. Nice work!
Additional Feedback
Encapsulate Functionality You want to call the least amount of methods outside of the class as possible. In this case, that would mean creating methods to call other methods. Some examples (in main.rb): Line 77 could be wrapped up in a method called like so game.end?. Lines 91-105 could all be encapsulated and called in one method like game.new_guess(input_letter), since all those methods are always ran together. Lines 108-117 is logic specific to the game, and should be a method that belongs to game (other than the gets.chomp, but that is repeated in the if statement and should be called after).
Word Class Give it more responsibility. At the moment it isn't doing much, not enough to justify it as a class. Ex: Have Game instances store an instance of Word, instead of the random string. Then give word methods that revolve strictly around the word, like replacing letters and showing the underscores.
attr_accessor Should all of Game's attributes have read and write methods? I would say none of them should have writers (since you'd never want to have the interface be able to change those directly, on the instance) and only some of them should have a reader (the ones that are called in main.rb). If you encapsulated more of the functionality (like suggested above), most of the attributes wouldn't even need a reader.

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