-
Notifications
You must be signed in to change notification settings - Fork 26
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
Tor and Angela - Octos - Scrabble #3
base: master
Are you sure you want to change the base?
Conversation
…rray will return that word
ScrabbleWhat We're Looking For
Overall you did a nice job with this assignment. You exercised the major learning goals including iterators, enumerables, testing and other fun stuff! |
|
||
winner = all_highscores[0] | ||
if all_highscores.any? { |word| word.length == MAX_WORD_LENGTH } | ||
seven_letter_score = all_highscores.select { |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.
If you expect that this could only be one winner (by the [0]
below) you could just use find
instead of select
end | ||
|
||
it 'if tied, prefer a word with 7 letters' do | ||
word_array = ['qqzzqq', 'aaaaadb'] |
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.
How would these be tied scores?
Scrabble
Congratulations! You're submitting your assignment.
Comprehension Questions
score
method in theScoring
class a class method instead of an instance method?Enumerable
mixin? If so, where and why was it helpful?