Skip to content

Wenjie Fang & Karinna Iniguez - Word Guess - Octos#6

Open
wf1101 wants to merge 11 commits intoAda-C9:masterfrom
wf1101:master
Open

Wenjie Fang & Karinna Iniguez - Word Guess - Octos#6
wf1101 wants to merge 11 commits intoAda-C9:masterfrom
wf1101:master

Conversation

@wf1101
Copy link

@wf1101 wf1101 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 successfully switched back and forth between being the driver and navigator. We also both listen to each other's ideas and incorporated both of our suggestions.
For each partner what parts of the project did you find challenging? Wenjie: To keep both of us on the same page of the design and coding part. Karinna: The most challenging parts for me were thinking out loud and trying to describe code as we were thinking about it. At least for myself, code vocabulary is still something that takes time. So I think about code and then had to get my thoughts together before expressing them to Wenjie.
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 used a method on the instance of a new game to check if user's guess is correct. The method takes user's guess as input. It differentiates one letter from a word string. Then it decides if the guess was correct. It either updates the display array if it's correct or updates the candle array if it's wrong. Last, the user guess will be pushed into the user guess array. This only gives an output if the game is over(by calling the game_over method).
Describe an instance where you used a local variable instead of an instance variable. Why did you make that choice? We used a local variable in one of our instance methods - display. The variable is updated multiple times in the method. It will not be referencing outside the class.
What code, if any, did you feel like you were duplicating more than necessary? We tried to minimize all redundancy by making methods outside the class.
Is there a specific piece of code you'd like feedback on? Our until loop to insure the user has entered a valid guess.

@CheezItMan
Copy link

Word-Guess Game

What We're Looking For

Feature Feedback
Baseline
Regular Commits with meaningful commit messages. Pretty good number of commits. I would suggest making commit messages about functionality added not messages like, "Last update @ 5pm"
Readable code with consistent indentation. Very nicely done
Answered comprehension questions Check
Product Functionalities
Created a Class to encapsulate game functionality. Yes, but you have one class encapsulating everything. Consider breaking it up further. You did a great job breaking up tasks into methods.
Used methods to DRY up your code. Check
Created instance variables & local variables where appropriate. Do you need both @word and @word_array as instance variables?
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, good use of the gem.
Programmed "defensively" to detect errors in user input. In many places, but no defensive programming about where the user wants to continue.
Summary Very nicely done, you hit all the requirement and I like how on "easy" it fills in the vowels. Great work


end # Until loop

puts "Would you like to play another game? (yes/no)"

Choose a reason for hiding this comment

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

It would be better to put this in a kind of loop that forces the user to enter "yes" or "no" and not simply end the program if the decision isn't "yes"

Copy link
Author

Choose a reason for hiding this comment

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

Fixed.

puts "Guess a letter: "
guess = gets.chomp.downcase

until is_a_letter?(guess) && !(new_game.guessed?(guess)) && (guess.length == 1 || guess.length == new_game.word.length)

Choose a reason for hiding this comment

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

This is pretty good, although I'm not sure you need the last part of the until conditional.

Copy link
Author

Choose a reason for hiding this comment

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

Our program only accepts 1 single letter or word with exact secret word length as valid input.

@@ -0,0 +1,184 @@
# Word_Guess Project
require "colorize"
require "spicy-proton"

Choose a reason for hiding this comment

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

Interesting gem choice!

@wf1101
Copy link
Author

wf1101 commented Feb 24, 2018

: )

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