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

Adagrams by Jackie and Jane #12

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

Conversation

jacquelynoelle
Copy link

Adagrams

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
What are the components that make up a method? def, signature (including parameters), body, end
What are the advantages of using git when collaboratively working on one code base? Git helps control versions, merge changes, and allows multiple people to edit a file at once.
What kind of relationship did you and your pair have with the unit tests? Helpful!
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? Yes, we used map inside of the uses_available_letters array to create a new array of the letters in hand that we could play with without modifying the actual hand. We also used reduce to sum up the score of various letters into a score for the whole word that was an integer. Last but not least we also used include? in most of our methods.
What was one method you and your pair used to debug code? We used pry to test method and variable values at different points in the code, and we used stack traces from the tests to find out where problems occurred.
What are two discussion points that you and your pair discussed when giving/receiving feedback from each other that you would be willing to share? 1. Whiteboarding was a helpful way to make sure we both understood what was going on and were on the same page before we started writing code. 2. When working in a new pair, doing frequent check-ins is helpful: e.g. "Are you ready to start the next thing?" "Do you feel like you understand why this works?"

@CheezItMan
Copy link

Adagrams

What We're Looking For

Feature Feedback
General
Answered comprehension questions Check
Both teammates contributed to the codebase Check
Small commits with meaningful commit messages Fairly good small commits
Code Requirements
draw_letters method Check, but you have a subtle bug. See my inline comments.
Uses appropriate data structure to store the letter distribution Not quite because it leads to an equal chance for a Q and an E to be drawn.
All tests for draw_letters pass Check
uses_available_letters? method Check, works fine
All tests for uses_available_letters? pass Check
score_word method Check
Uses appropriate data structure to store the letter scores Check, although a hash would work as well
All tests for score_word pass Check
highest_score_from method Check
Appropriately handles edge cases for tie-breaking logic Check, well done!
All tests for highest_score_from pass Check
Overall Overall nice work, you hit the major learning goals. Just the one subtle bug in your draw_letters method. You made some good uses of Enumerables and handled the edge cases for the highest_score_from method well. Great work!

# WAVE 1
# The draw_letters method starts with a fresh pool of tiles and returns
# an array of 10 letters (the "hand").
def draw_letters

Choose a reason for hiding this comment

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

Small issue here, each letter has an equal chance to be drawn. Instead an A should be 9 times more likely than a J.

Instead you'll need an Array like:

["A","A","A","A","A","A","A","A","A","B","B"...]

And draw from that array, removing letters as they're drawn.

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.

3 participants