Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Ampers) Kirsten & Leticia - Word Guess #20

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

LetiTran
Copy link

@LetiTran LetiTran commented Feb 14, 2018

Word Guess

Congratulations! You're submitting your assignment.

Comprehension Questions

In the next comment.

@kschumy
Copy link

kschumy commented Feb 14, 2018

Feature Feedback
How do you feel you and your partner did in sharing responsibilities?  We took turns being the driver and navigator. We tried to switch whenever is seemed like one person was struggling or needed a break. On the second day when we were more heavily in the debugging and refactoring, we switched more frequently, and we tried to be aware of the other person's needs and check in with them to see if they needed a break.
For each partner what parts of the project did you find challenging? We struggle a lot at the beginning trying to figure out how to store the letters. We considered using arrays instead of strings to store the secret word and the word(s) the user was trying to guess, and then when back and forth on how to store the other related instance variables (arrays vs strings again and how any instance variables we needed). After that, the program went smoothly until the second day.

On day two, we decided to make a second class for the words/letters because the game class just seemed too big and complicated once we started adding all the optional tasks. But adding a second class at that point was very cumbersome and confusing, as it was hard to move all the instance variables and the methods around. Looking back on this experience, we definitely should have spent considerable time planning out what we expected each class to do and lay out specific plans for each. We had done this on the first day, and it had worked great, but I think we underestimated how complicated things got when we started shifting things around without VERY clear plan, like we did with our outlined checklist on day one.
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 tried to use a number of methods to break our code up into manageable portions that accomplished one tasks (though this was challenging and was something we would have loved to have had more time to do more of!). An example of this was our game_over that was this. It returned 'true' if there were not any more chances to guess a wrong letter or if the user has completed guessing the mystery word(s), and 'false' if this was not the case. It did not take anything, but it did call a method (@word.guessed_right_word(@right_guesses)) that used an argument to call another method.
Describe an instance where you used a local variable instead of an instance variable. Why did you make that choice?  We used a number of instance variables to store information we knew the game needed over time. One example of this was @wrong_guesses. We used this in Game to hold all the letters the user had guessed that were incorrect. We wanted to keep track of the letters the user had guessed incorrectly so that the user would not be docked multiple times for guessing the same letter.
What code, if any, did you feel like you were duplicating more than necessary?  Possibly how we're storing the letters. It seems like we could be better about this. Adding the Word class after the Game class seemed to contribute to this problem. We had a lot of "ghosts of code past" problems when we were reviewing our code, specifically things that were needed from previous versions that were lingering around even though the current version does not need them.

Just as we were reflecting on the code to write this up, we realized we might (no guarantee!) not actually need the @guesses_remaining attribute because we could get this number from the @wrong_guesses length. No promises that this is actually the case, but it does seem like it right now.
Is there a specific piece of code you'd like feedback on? Our use of attributes in both classes and how we could have improved on this, specifically in what we're storing, if we could have been more efficient with what we were doing, and if certain attributes would have been better in the other class.

@CheezItMan
Copy link

Word-Guess Game

What We're Looking For

Feature Feedback
Baseline
Regular Commits with meaningful commit messages. Good number of commits, but focus on functionality added in your commit messages.
Readable code with consistent indentation. Lots of indentation issues, check for this in the future, I left one in-code comment for a particular part.
Answered comprehension questions Check, You are right about @guesses_remaining. You had a good selection of attributes.
Product Functionalities
Created a Class to encapsulate game functionality. Good set of two classes
Used methods to DRY up your code. Very good work breaking things into methods.
Created instance variables & local variables where appropriate. Well done
Used Arrays to store lists of letters guessed. Check
Used variables & random numbers to allow the game to function with multiple words, no hard-coded answers. Check, you had freaking hard quotes to guess.
Programmed "defensively" to detect errors in user input. Well done
Summary Excellent work! You hit all the requirements and several extras.

# Method to prompt the user for an yes or no answer on the matter of starting the game all
# over again after the game is over (when the user wins or looses).
def play_again?
print "\nThe game is over! Would you like to play again? (Y/N) >".center(60).blue

Choose a reason for hiding this comment

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

You should, "trap," the user in a loop that doesn't exit until they enter "Y" or "N".

private

# Method to set string with the color blue and add a new line after it.
def print_line_in_blue(text_to_print)

Choose a reason for hiding this comment

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

All methods inside the class should be indented 2 spaces or one tab.

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