Branches Vi && Steph #21
Conversation
AdagramsWhat We're Looking For
Fantastic work on this project, you two! Your submission has really excellent and readable code. You two made really good decisions about how to keep the code clean and logical. There are even small touches like how you had the comments in the file to describe the methods that were really good. I have a few comments to point out places where your code could've been cleaned up a little-- this mostly is in some places where "dead code" remained. That being said, great work overall! :) |
| end | ||
| all_letters << letters | ||
| end | ||
| all_letters = all_letters.flatten |
There was a problem hiding this comment.
NICE! This ends up being so clean and clever!
| [],['A', 'E', 'I', 'O', 'U', 'L', 'N','R', 'S', 'T'], | ||
| ['D','G'],['B', 'C', 'M','P'],['F','H', 'V', 'W', 'Y'], | ||
| ['K'],[],[],['J', 'X'],[],['Q', 'Z'] | ||
| ] |
| end | ||
| end | ||
| puts letter_points | ||
| puts word.split("") |
There was a problem hiding this comment.
Don't forget to delete your puts statements before you submit!
|
|
||
| # Wave 4 | ||
|
|
||
| def highest_score_from(words) |
There was a problem hiding this comment.
Here, you have a first definition of a method named highest_score_from, and then below, you redefine a method with the same name. Ruby ends up using the later definition (because that's what gets defined last), but Ruby still gives a warning warning: method redefined; discarding old highest_score_from. Feel free to delete this method if it doesn't get used in the end!
| top_word = "" | ||
| top_score = 0 | ||
| tie_breaker_word = "" | ||
| tie_breaker_score = "" |
There was a problem hiding this comment.
The variable tie_breaker_score ends up not being used anywhere else in the file-- is it safe to delete?
Adagrams
Congratulations! You're submitting your assignment.
Comprehension Questions
Enumerablemixin? If so, where and why was it helpful?