Skip to content

Jazz_Sabine_adagrams#25

Open
Sabineth17 wants to merge 13 commits intoAda-C10:masterfrom
Sabineth17:master
Open

Jazz_Sabine_adagrams#25
Sabineth17 wants to merge 13 commits intoAda-C10:masterfrom
Sabineth17:master

Conversation

@Sabineth17
Copy link

Adagram

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
What are the components that make up a method?
The components that make up a method are its name, its argument(what is expecting) and its parameters(what are the variables used to refer to pieces of data provided as input).

What are the advantages of using git when collaboratively working on one code base? |
Being able to simultaneously access changes to the codes and updates. It is also a tracking repository that enables a collaborative team to view each other's information (somewhat live).

What kind of relationship did you and your pair have with the unit tests?
Our relationship was based on teaching and learning. We took some time to speak, write, drive, navigate, drive a lot and some navigation, researching... We used the unit tests to guide our learning and drive better understanding of the code.

Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? We initially utilized .map and opted for .each to instead. We also used include?, see code below during Wave 2 to ensure that users utilized letters from the hand.
input.split("").each do |letter| if letters_in_hand.include?(letter)

What was one method you and your pair used to debug code?
We used 'pry'/binding.pry several times to debug our codes. Pry allowed us to run our code but also call values to confirm what was being returned. We also discussed with TA/Instructors and tutors along with some of our classmates to support our knowledge and verify our 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? | Being able to take time to speak and write more during our time working on this project together.

@CheezItMan
Copy link

Adagrams

What We're Looking For

Feature Feedback
General
Answered comprehension questions Check
Both teammates contributed to the codebase I believe so
Small commits with meaningful commit messages Good commit messages and granular commits, nice work!
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, well done
All tests for highest_score_from pass Check
Overall Very nice work, you hit all the learning goal and got all the methods working. See my comment on some of your code's structure, but it all works. Great Job!

@@ -0,0 +1,23 @@

def draw_letters
letters = %W[A A A A A A A A B B C C D D D D E E E E E E E E E E E E F F G G G H H I I I I I I I I I J K L L L L M M N N N N N N O O O O O O O O P P Q R R R R R R S S S S T T T T T T U U U U V V W W X Y Y Z]

Choose a reason for hiding this comment

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

Why is this file duplicated?

#Wave 1
#method that represent the hand of letters that the player has drawn
def draw_letters
letters = %W[A A A A A A A A B B C C D D D D E E E E E E E E E E E E F F G G G H H I I I I I I I I I J K L L L L M M N N N N N N O O O O O O O O P P Q R R R R R R S S S S T T T T T T U U U U V V W W X Y Y Z]

Choose a reason for hiding this comment

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

🥇

input.split("").each do |letter|
if letters_in_hand.include?(letter)
letters_in_hand.each_with_index do |hand_letter,index|
if hand_letter == letter

Choose a reason for hiding this comment

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

This works, it's a little awkward. You can use a method to get the 1st index of a given argument instead of using the loop.

high[:score] = score_word(word)
high[:word] = word
#In the case of tie in scores, prefer the first word with ten letter over the word with fewer tiles
elsif score == high[:score] && word.length == 10 && high[:word].length != 10

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