Skip to content

Conversation

@qqdipps
Copy link

@qqdipps qqdipps commented Feb 22, 2019

Adagrams

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
What are the components that make up a method? First part of method is the method signature. Method signature includes def tag and method name followed by optional parameters. Then there is a code block. Finally a return statement is used to explicit return an object reference. If no return statement then the last line is implicitly returned.
What are the advantages of using git when collaboratively working on one code base? Using git while working on one local machine did not significantly affect collaboration. If we were using two machines then using git for collaboration helps track changes and makes its easier to knit conflicting code together.
What kind of relationship did you and your pair have with the unit tests? We used the unit test to see if the changes we were making were on the right track. We would write some code then we would run our rake file. Then check if they passed, failed, or error-ed.
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? No, We used .each_with_index , .each, and .each_char.
What was one method you and your pair used to debug code? We used the unit tests, stack trace, and VS debugger.
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 worked really well switching roles, taking breaks, and having nice environment to work. 2) We did a really good job talking through the waves together. We broke down the requirements and outlined what the method would need to do, then we mapped out our solutions and logic with psuedocode before we sat down to code it.

@CheezItMan
Copy link

Adagrams

What We're Looking For

Feature Feedback
General
Answered comprehension questions Check, I'm glad you worked so well together
Both teammates contributed to the codebase Check
Small commits with meaningful commit messages Good job making small specific commits. I also liked your commit messageas.
Code Requirements
draw_letters method Check
Uses appropriate data structure to store the letter distribution Check
All tests for draw_letters pass Check
uses_available_letters? method Check
All tests for uses_available_letters? pass Check
score_word method Check
Uses appropriate data structure to store the letter scores Check
All tests for score_word pass Check
highest_score_from method Check
Appropriately handles edge cases for tie-breaking logic Check
All tests for highest_score_from pass Check
Overall Well done, you hit all the learning goals for the project. Outstanding work!

@@ -1,0 +1,57 @@
def draw_letters()
pool_letters = "aaaaaaaaabbccddddeeeeeeeeeeeeffggghhiiiiiiiiijkllllmmnnnnnnooooooooppqrrrrrrssssttttttuuuuvvwwxyyz".split("")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting way to structure the pool of letters.

def draw_letters()
pool_letters = "aaaaaaaaabbccddddeeeeeeeeeeeeffggghhiiiiiiiiijkllllmmnnnnnnooooooooppqrrrrrrssssttttttuuuuvvwwxyyz".split("")
hand = []
10.times do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works well, but you can also use .sample as well.

input.each_char do |char|
if letters_in_hand.include?(char)
letters_in_hand.each_with_index do |letter, i|
letters_in_hand.delete_at(i) if letter == char

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note, this will destructively change letters_in_hand which could cause side effects.


def score_word(word)
score_chart = Hash.new(0)
score_chart = { a: 1, e: 1, i: 1, o: 1, u: 1, n: 1, r: 1, s: 1, t: 1, d: 2, g: 2, l: 1,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice data structure

return score
end

def highest_score_from(words)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants