Skip to content

Severin and Stef - Carets #12

Open
s-wigg wants to merge 11 commits into
Ada-C8:masterfrom
SesameSeeds:master
Open

Severin and Stef - Carets #12
s-wigg wants to merge 11 commits into
Ada-C8:masterfrom
SesameSeeds:master

Conversation

@s-wigg

@s-wigg s-wigg commented Aug 21, 2017

Copy link
Copy Markdown

Word Guess

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
How do you feel you and your partner did in sharing responsibilities? Please make sure you review "new_word_guess.rb" and not the other file. There were unique external circumstances that prevented this from being a fully traditional pair programming assignment.
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 to deal with what needs to be displayed on the screen both in terms of the ascii art and the correct and incorrect guesses. It takes the number of tries remaining as well as variables containing incorrect and correct guesses as input and then displays the info on the screen. It will take the number of tries remaining and print a corresponding number of pieces of sushi as well as displaying an array of letters guessed incorrectly and displaying the answer with any correct letters filled in.
Describe an instance where you used a local variable instead of an instance variable. Why did you make that choice? I'm still a little fuzzy on this and when you should pick one versus the other. At lines 67-77, I had display_array (which is actually a string) as an instance variable, but because the correct_display method returned display_array I was still able to use the information by utilizing the correct_display method in other parts of the code, for example, at line 84.
What code, if any, did you feel like you were duplicating more than necessary? Nothing specific struck me as overly duplicative.
Is there a specific piece of code you'd like feedback on? The loop at lines 16-29 is oddly structured. At the time, it was the only way I could conceptualize it that was also working, but it would be helpful to see a way that could have been done better.

@CheezItMan

Copy link
Copy Markdown

Word-Guess Game

What We're Looking For

Feature Feedback
Baseline
Regular Commits with meaningful commit messages. Good commit messages, a few more commits would be better.
Readable code with consistent indentation. Check, nice use of private methods.
Answered comprehension questions Check, for the loop you highlighted, I would not have an if statement in it. Instead I would put an if win/lose block after the while to print after the loop ends. I would also make the loop run while @tries > 0 && correct_display == answer, but your block certainly works.
Product Functionalities
Created a Class to encapsulate game functionality. Check
Used methods to DRY up your code. Check, good use of private
Created instance variables & local variables where appropriate. Check
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, nice use of the random-word gem.
Programmed "defensively" to detect errors in user input. Well done, good use of until loops.
Summary Well done, you hit all the requirements. Nice use of Regular Expressions to check for guesses. This was clearly and elegantly done.

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