-
Notifications
You must be signed in to change notification settings - Fork 33
Branches - Caroline & Paige #5
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
Oops. Incomplete answer on #4. We used enumerables in many places, it was very helpful for iterating through the data and methods like .map was helpful in reducing the line count. |
AdagramsWhat We're Looking For
Well done on this project, Caroline and Paige! Your code overall is extremely easy to understand because your submission has such clean, logical, readable code style and decisions. Great solutions! I've added a few comments about small refactorings I could imagine happening if you had more time on this project. That being said, well done overall |
end | ||
end | ||
|
||
def draw_letters |
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.
Instead of the preliminary set up before the draw_letters
method, would this work or could we change it so it would work?
garbage_index = clone_letters_in_hand.rindex(input_array[index]) | ||
clone_letters_in_hand.delete_at(garbage_index) | ||
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!
return false | ||
elsif input.length == 0 | ||
return false | ||
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.
Nice! Catch some edge cases before doing the hard work.
D: 2, G: 2, B: 3, C: 3, M: 3, P: 3, F: 4, H: 4, V: 4, W: 4, Y: 4, | ||
K: 5, J: 8, X: 8, Q: 10, Z: 10 } | ||
|
||
word_array = word.upcase.split(//) |
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.
Warning: Your indentation here is off, so it makes the rest of the file off in indentation!
end | ||
|
||
####################### WAVE 4 ########################## | ||
words = [] |
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.
You don't need this variable, and it's "floating" outside of any method, so feel free to delete this line
end | ||
|
||
return {word: winner, score: highest_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.
An elegant, clean, readable, straightforward, delicious solution for this method overall!
all_words = CSV.read('assets/dictionary-english.csv') | ||
input = [input.downcase] | ||
return all_words.include? input | ||
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.
Nice work on this optional wave! :)
all_words = CSV.read('assets/dictionary-english.csv') | ||
input = [input.downcase] | ||
return all_words.include? input | ||
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.
Tests? ;)
Adagrams
Congratulations! You're submitting your assignment.
Comprehension Questions
What are the advantages of using git when collaboratively working on one code base? | Multiple people can update & see the code. If you mess up, you can go back to a save point. If you want to branch out and try something new in the past, you can.
What kind of relationship did you and your pair have with the unit tests? | Great! We can see what went wrong and figure out how to resolve the bugs.
Does your code use any methods from the
Enumerable
mixin? If so, where and why was it helpful? | .map, .each, .times,What was one method you and your pair used to debug code? | We used pry to fix a bug where the variable wasn't reassigning to the correct value.
What are two discussion points that you and your pair discussed when giving/receiving feedback from each other that you would be willing to share? | 1. We each see something that the other doesn't see, and that's very cool because it leads to new insights that we might not have had if we worked alone. 2. Being upfront about our own habits and interaction style before actual coding, helps us avoid communication problems and make the work come along much more smoothly than if we had to spend time hammering things out between ourselves.