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

Ayesha and Ren's Adagrams project submission #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ayaseef
Copy link

@ayaseef ayaseef commented Sep 17, 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?
What are the advantages of using git when collaboratively working on one code base?
What kind of relationship did you and your pair have with the unit tests?
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful?
What was one method you and your pair used to debug code?
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?

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.

Nice work Ayesha & Ren, you hit all the learning goals here including the optional dictionary methods. Well done. Take a look at my comments especially about draw_letters and let me know what questions you have.

Comment on lines +37 to +41
until ten_strings_array.length == 10
rand_letter = letters_pool_keys[rand(letters_pool_keys.size)]
if (letters_pool_to_draw_from[rand_letter]).zero?
next
else
Copy link
Collaborator

Choose a reason for hiding this comment

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

This runs, but it gives an equal probability of drawing a Z and an E.

A better strategy would be to use your hash to build an array of all the letters with 9 As, 2 Bs etc , shuffle the array and then draw the right number of letters.

Comment on lines +50 to +51
# WAVE 2
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.

👍

end

# Wave 3
def score_word(word)
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 , This works well.

Comment on lines +92 to +93
# Wave 4
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.

👍

end
end
end
max_pair
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
max_pair
return max_pair

Comment on lines +117 to +118
# Wave 5
def is_in_english_dict?(input)
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 , Nice work with the optional.

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