-
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 - Julia & Eve #14
base: master
Are you sure you want to change the base?
Conversation
Edited word in a comment
AdagramsWhat We're Looking For
Eve and Julia!! You two have a fantastic solution! I see a lot of thought put into your submission; you all achieved not only a good, logical, readable solution, but it has obviously gone through refactoring to make it as clever and elegant as possible within this time. Some of the only things I could think of for improvement on this submission would be to add in the unit tests for the optional wave 5, and practice using more descriptive commit messages. Otherwise, please keep up the clarity in logic and code, and maintain the refactoring when you can. Great work on this submission! |
drawn_letters = [] | ||
10.times do | ||
letters.shuffle! | ||
drawn_letters << letters.pop |
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.
Nice! Using .pop
here is concise and a good call
characters.each do |char| | ||
index = current_letters_in_hand.find_index(char) | ||
# if index number is truthy, delete element at index | ||
if index |
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.
Nice logic here that relies on truthiness and understanding what find_index
does!
current_letters_in_hand.delete_at(index) | ||
# if index number is falsey, return false | ||
else | ||
return false |
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.
Nice logic; putting a return false
here will break the method out as soon as it needs to
winner = winner.empty? ? high_scores.min_by { |element| element.length } : winner[0] | ||
|
||
return { word: winner, score: best_result[:score] } | ||
end |
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.
I'm obsessed with y'alls implementation of this method! It's so clever and so concise! It looks so good! The only thought for improvement is maybe using a different variable name besides obj
. Otherwise, I love how it reads!
|
||
# WAVE 5 | ||
|
||
def is_in_english_dict?(input) |
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.
Great work on the optional! :D ...Tests? ;)
Adagrams
Congratulations! You're submitting your assignment.
Comprehension Questions
Enumerable
mixin? If so, where and why was it helpful?