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

Kat and Luxi - Word Guess - Octos #5

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

Conversation

Lindseyls
Copy link

@Lindseyls Lindseyls commented Feb 14, 2018

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 did an awesome job working together. We took each part and one of us would say what we needed to do and the other would figure out how to do it. We divided the time to drive based on inspiration and how the flow was going. We made sure that we were trading off and no one felt they were monopolized a role.
For each partner what parts of the project did you find challenging? Getting started was difficult as we took time to figure out how to work dynamically. So we took the first day to polish the ASCII and gave us each a chance to wrap our heads around the assignment and the requirements.
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 encapsulated the word selection into the Word Mechanics class. The inputs were all internal, but it would output the current word and the array with underscores. Our Guess Mechanics class took the new Word Mechanics object as an input and output the guessing game functionality.
Describe an instance where you used a local variable instead of an instance variable. Why did you make that choice? We made our user input variable called letter a local variable instead of an instance variable because we knew that we wanted to throw it away after each iteration, and it would be saved in an instance variable anyway once the loop executed. We also used a local variable to ask for the difficulty of the word list, and based on the answer assigned an instance variable to another instance variable. Hard or Easy to word_array.
What code, if any, did you feel like you were duplicating more than necessary? We feel that our code is DRY, however we did repeat the instance variables between our Mechanics classes.
Is there a specific piece of code you'd like feedback on? Not a specific piece, but, we would love to know if there is a piece of code that we could have made it more DRY or logical.

…WordMechanics object as an initialize argument.
… guessed letter is included in the current word. Increment wrong guess counter if it is not.
… word array. We used the index to replace the underscore in letter holder with the correct guessed letter.
…m to screen once user has made an incorrect guess
…working out the details. Added case-statements to handle wrong guesses.
…he user does not guess the correct letter the current word underscore will print.
@CheezItMan
Copy link

Word-Guess Game

What We're Looking For

Feature Feedback
Baseline
Regular Commits with meaningful commit messages. Good number of commits and good commit messages.
Readable code with consistent indentation. Well done
Answered comprehension questions Check, You did a pretty good job DRYing thing up, but your organization into classes is a little wonky. GuessMechanics are a series of actions, not a thing in and of itself and your WordGuess class doesn't really do much. When creating classes don't focus on the tasks to be performed, but rather what entities does your app have. Then you can figure what each entity can do. You seemed to bunch together actions alone.
Product Functionalities
Created a Class to encapsulate game functionality. Yes, but see my note above about your 3 classes.
Used methods to DRY up your code. Check, although you could break up your guess_letter method into two, one which handle user input and the other handles the mechanics of updating
Created instance variables & local variables where appropriate. Check, nicely 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
Programmed "defensively" to detect errors in user input. Yes, except for continuing the game.
Summary Nicely done, you hit all the requirements. Think a bit about how you organized the game. You want to organize classes around nouns, people places or things, rather than actions.

guess_ui = GuessMechanics.new(new_word)
guess_ui.guess_letter
puts "\nDo you want to play again?"
@play_again = gets.chomp.downcase

Choose a reason for hiding this comment

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

I would put this into a loop that will repeat until the user picks "yes" or "no." Instead anything other than "yes" will cause the program to stop.

print @letter_holders.join(' ')
else
puts "Oooh, that sucks. You entered the wrong letter. Draw more TROGDOR!"
print @letter_holders.join(' ')

Choose a reason for hiding this comment

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

You might move this puts outside the if/else block

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