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

Fire - Noor and Anna #17

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

Fire - Noor and Anna #17

wants to merge 8 commits into from

Conversation

annakim93
Copy link

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? Each method takes arguments and includes a code block that is run so we don't need to repeat code and can return something.
What are the advantages of using git when collaboratively working on one code base? Git helps us see what changes were made (version history), which helps with proper collaboration and communication between team members.
What kind of relationship did you and your pair have with the unit tests? We switched off being driver and navigator
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? We used 'first' to get the first 10 letters after shuffling to make the hand of letters. We used 'chars' to create an array from a string with each character. We used 'map' to get the points for each word and the lengths of each word.
What was one method you and your pair used to debug code? We used 'p' to print and we made our own inputs to see if our code worked the way we expected.
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) When we were overcomplicating, we took a step back and talked about what we want the code to do and were able to get to a simpler solution. 2) We made sure to have fun while working, so even when we struggled in some parts, we enjoyed learning together.

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.

Overall not bad. You hit the main learning goals here. However check out my comments on highest_score_from. I'm not convinced it works in all cases.

Comment on lines +4 to +5
.floo
.flooignore
Copy link
Collaborator

Choose a reason for hiding this comment

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

Smart!

@@ -0,0 +1,129 @@

LETTERS = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice way to set up the distribution of letters.

}

# WAVE 1
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.

👍


# 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.

👍


# 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.

👍

return hash
elsif length < 10
min_length = word_lengths.min
hash[:word] = words[word_lengths.index(min_length)]
Copy link
Collaborator

Choose a reason for hiding this comment

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

This might not work in all cases. What if there is a non-winning word with an equal length

Copy link
Author

Choose a reason for hiding this comment

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

Ah I see! Because we are checking through all the words that are passed as an argument, when we should be looking at the subset that has the highest points - is that right?

Comment on lines +113 to +115
hash[:word] = words[word_lengths.index(length)]
hash[:score] = points[word_lengths.index(length)]
return hash
Copy link
Collaborator

Choose a reason for hiding this comment

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

You don't know if the word with length 10 is tied for the highest score here.


# 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.

I am uncertain that this method will work in all cases. See my comments below.

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.

3 participants