Skip to content
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

Adagrams submission from Mona and Tram #12

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

trambui09
Copy link

@trambui09 trambui09 commented Sep 18, 2020

Assignment Submission: Adagrams

Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.

Reflection

Feature Feedback
What are the components that make up a method? method signature, parameters, arguments, method body, return, invoking a method
What are the advantages of using git when collaboratively working on one code base? you can push and pull the latest versions of the program and work from one central base
What kind of relationship did you and your pair have with the unit tests? We called rake on the terminal to test each wave of adagrams
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? Yes, we used map, select, sort_by. Select was helpful in wave 4 to find the max score and selected the elements that had those, then we sorted it and returned the shortest word
What was one method you and your pair used to debug code? We would call the methods with arguments and see if the actual values matched up with our expected values
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? We wanted to be better at naming our variables, we appreciated that we were responsive and flexible with scheduling, we came in prepared and have read the wave instructions prior.

Copy link
Collaborator

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

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

Well done Mona & Tram, y'all hit the learning goals here. Well done.

Comment on lines +1 to +2
# create draw_letters method
def draw_letters
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 , very straightforward and effective.

return hand_of_letters.sample(10)
end

def uses_available_letters?(input, letters_in_hand)
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Comment on lines +31 to +32
def score_word(word)
letters_and_value = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍
I really like the use of a hash here!

return {word: word, score: score_word(word)} if word.length == 10
end

return words_and_scores_array.select {|hash| hash[:score] == max_score}.sort_by{|hash| hash[:word].length}[0]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Really clever way to get the smallest of the highest scoring words.

return score
end

def highest_score_from(words)
Copy link
Collaborator

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