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

Tanja and Gale WordGuess #14

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

Conversation

misstonbon
Copy link

@misstonbon misstonbon commented Aug 21, 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? We were both very flexible so we occasionally didn't have strict time limits on who is the driver and who is the navigator, however, both shared equal workload.
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 limit the functionality of Game class to only include the method .play, allowing the user to only play the game, and not change it. attr_readers were set accordingly.
Describe an instance where you used a local variable instead of an instance variable. Why did you make that choice? guess is the local variable. It's used that way so we would limit its scope to the block within the play method. guess is provided by the user.
What code, if any, did you feel like you were duplicating more than necessary? I think we did a good job of DRying up the code, however we mentioned random_word here and there because that is the faker-generated word and it needed to be used for comparison in a loop.
Is there a specific piece of code you'd like feedback on? Yes, on lines 12-24. We set up a counter variable in order to refer to an index of an array. I wonder if there are any enumerable methods (.map?) that could make this a bit prettier/more efficient. .

@misstonbon misstonbon changed the title Tanja Tanja and Gale WordGuess Aug 21, 2017
"Nope! Hint: You can get a gallon of it at Trader Joe’s, but I doubt it’s organic.",
"That’s not niche enough."
]
puts "This hang-man game is elite and invite-only (requires a password).\nHow do you take your vegan chai?"
Copy link

Choose a reason for hiding this comment

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

I LOVE THIS.

At first I didn't know the answer and typed "hot...?"


def reveal(guess)
counter = 0 #keeps track of random_word array index number
@changed = nil
Copy link

Choose a reason for hiding this comment

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

It would probably be fine to set @changed to false instead of nil

@tildeee
Copy link

tildeee commented Aug 28, 2017

Word-Guess Game

What We're Looking For

Feature Feedback
Baseline
Regular Commits with meaningful commit messages. x
Readable code with consistent indentation. x
Answered comprehension questions x
Product Functionalities
Created a Class to encapsulate game functionality. x
Used methods to DRY up your code. x
Created instance variables & local variables where appropriate. x
Used Arrays to store lists of letters guessed. x
Used variables & random numbers to allow the game to function with multiple words, no hard-coded answers. x
Programmed "defensively" to detect errors in user input. x

@tildeee
Copy link

tildeee commented Aug 28, 2017

Great project! The project is great, looks good, and is fun.
I think the way you all define and use the @changed flag was confusing at first. I get it now, but it took me a little bit to understand where you were going with it.

Regarding your questions on feedback around lines 12-24: your intuition is right, using .map would probably be way more helpful at this point. :)

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