Skip to content

Ampers: Nora Peters, Aruna Thungathurthi#7

Open
npeters5 wants to merge 4 commits intoAda-C9:masterfrom
npeters5:master
Open

Ampers: Nora Peters, Aruna Thungathurthi#7
npeters5 wants to merge 4 commits intoAda-C9:masterfrom
npeters5:master

Conversation

@npeters5
Copy link

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 feel that we did a good job sharing responsibilities equally.
For each partner what parts of the project did you find challenging? We both had difficulty deciding what classes to make and how many. We also had to troubleshoot where exactly to place print or puts statements.
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 wrote a method called random_word inside class Game. random_word generates a random word from a hard-coded array, then returns @word, which is used as input for the split_word method, which splits our word, stores it in an array, then uses that array to create another array of underscores.
Describe an instance where you used a local variable instead of an instance variable. Why did you make that choice? We created a local variable called num_wrong_guesses to use as a counter inside our guess method. We did this to track the number of wrong guesses and we're not using it elsewhere so it can be local.
What code, if any, did you feel like you were duplicating more than necessary? The code inside the guess method seems a bit wordy, perhaps there is a way to consolidate or create additional methods to reduce redundancy.
Is there a specific piece of code you'd like feedback on? We would like feedback on the guess method. Also, we noticed that the @guess_letter instance variable is only used inside guess method so it could be a local variable (?).

@tildeee
Copy link

tildeee commented Feb 22, 2018

Word-Guess Game

What We're Looking For

Feature Feedback
Baseline
Regular Commits with meaningful commit messages. Great commit messages
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

Great job with this submission!

I think the code is clean, understandable, and has appropriate design that fits the problem.

I really like how you handled displaying the ascii art (it was just an array that you called with puts @flower_pot[num_wrong_guesses])

I definitely agree with you all that @guess_letter could have been a local variable :)

Maybe the one suggestion I would make would be to start shifting your method names into action phrases. Instead of "random_word", maybe "generate_random_word", and instead of "guess", something like "handle_guess" or "play_guess" or "play_word_guess"

Great job!

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