-
Notifications
You must be signed in to change notification settings - Fork 29
Ports -- Amy W. and Kate #17
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
base: master
Are you sure you want to change the base?
Conversation
AdagramsWhat We're Looking For
|
| @@ -1,0 +1,75 @@ | |||
| # draws letters into hand | |||
| def draw_letters | |||
| letter_distribution = | |||
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 data structure!
| def uses_available_letters?(input, letters_in_hand) | ||
| word_array = [] | ||
| input.each_char { |letter| word_array << letter } | ||
| return word_array & letters_in_hand == word_array |
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.
Very slick!
|
|
||
| # scores word guessed and returns word score | ||
| def score_word(word) | ||
| letter_value = |
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.
👍
| best_word = word | ||
| end | ||
| end | ||
| highest_score.store(:word, best_word) |
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.
Why not just do highest_score[:word] = best_word?
Adagrams
Congratulations! You're submitting your assignment.
Comprehension Questions
Enumerablemixin? If so, where and why was it helpful?