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

Pipes-Nkiru Onwuneme Sara Frandsen- Word_Guess #9

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

Conversation

nkiruka
Copy link

@nkiruka nkiruka 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? During the day, we worked well shifting between driver and navigator. We tried working with the time constraints on the project and we would have liked more than to review and work on our code. We did our best despite our limited opportunity to work face to face. We started off strong but not having additional time affected how design and overall code.
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 created a track_guesses method that calculates the number of previous guesses, wrong and correct guesses. For instance, when a user enter an incorrect letter, the instance variable wrong guesses increases by 1(counter down) and if the user guesses the correct letter, the instance variable correct guesses is incremented by 1. Additionally, previous guesses tracks if a user has entered a letter more than once. The check_guess method is also called in this method. Inputs: previous guesses, guess(from user); output will be the wrong guesses.
Describe an instance where you used a local variable instead of an instance variable. Why did you make that choice? word_guess (located in main.rb), only used it when we need to create an instance of the class Word. It was the only way we could get the program to run.
What code, if any, did you feel like you were duplicating more than necessary? We were both concerned we had too many conditional statements.
Is there a specific piece of code you'd like feedback on? We initially created two classes: Word & Letter class and we felt that it was challenging to keep track of both classes, even though it might have leaned out our code a bit. We spent a lot time trying to figure out how to count the frequency of a letter in the array and also replace duplicate letters in the array. This cost us considerable amount time. Feedback on the overall flow of the code and initialize method will be appreciated.

@PilgrimMemoirs
Copy link

Word-Guess Game

What We're Looking For

Feature Feedback
Baseline
Regular Commits with meaningful commit messages. Needs improvement - good messages, should have more commits
Readable code with consistent indentation. Mostly Good - there is an end that's not indented at all, and before the class should be ending. See note on ends below.
Answered comprehension questions Well Done - If you were to add another class, Letter would be the most appropriate. Nice thinking, but okay if this solution doesn't have it. If you were to go back and add it in, what specific functionality would it be responsible for?
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. 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. Mostly Good - The first time an invalid character is guessed, it still counts as a strike against.
Overall Submission meets project expectations. Nice work!
Additional Feedback
ends The nesting of conditional statements becomes really hard to read, especially with keeping track of ends - there is an end on line 79 that is not indented (which should only be the end that closes the class). I was looking at it for a while trying to trace what all the ends were closing. This issue can be alleviated by wrapping functionality into methods, as mentioned below in 'clean up'.
counters The guesses counters (@total_guesses, @correct_guesses & @wrong_guesses), could be done more dynamically by calling .length on @previous_guess, checking to see how many dashes are in the dash array and how many letters are in the dash array.
Clean Up You don't have too many conditional statements, however each method does contain a lot of logic that should be split into separate methods for better readability.

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