-
Notifications
You must be signed in to change notification settings - Fork 33
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
Branches - Michaela & Angele #17
base: master
Are you sure you want to change the base?
Conversation
…or each letter, and updated draw_letters method accordingly
AdagramsWhat We're Looking For
Wow! You even wrote your own tests for Wave 5! Great job! Super cool that y'all agreed on a plan for the day together every day. I could stand to learn from that. Haha. Love that you used one data structure to store the quantities of the letters and the scores for the letters. Super efficient 👏 Great job y'all!!! |
|
||
def return_letter_pool_hash | ||
|
||
letter_pool_hash = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great just as it is! I just wanted to mention for the future that this is usually a great example of when a global variable (ie. LETTER_POOL_HASH = ...
). That way you wouldn't need to write a method and then gets called several times and a new copy of the hash wouldn't get created each time.
|
||
else | ||
|
||
copy_of_hand = letters_in_hand.clone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method looks great! I just wanted to name that this line isn't necessary as the copy_of_hand
variable as soon as the method returns on the next line. If that short explanation isn't clear, feel free to ask a fellow student or one of us instructors to get clarity on that.
end | ||
end | ||
|
||
min_length = highest_scores_hash.map { |word, score| word.length }.min |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a super clever and interesting way to do this!
Adagrams
Congratulations! You're submitting your assignment.
Comprehension Questions
Enumerable
mixin? If so, where and why was it helpful?