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

Ampers: Nora and Victoria's Scrabble assignment #19

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

Conversation

Lasiorhine
Copy link

@Lasiorhine Lasiorhine commented Feb 24, 2018

Scrabble

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
What are the advantages of using git when collaboratively working on one code base? It enabled us to work on our own machines during pairing, which was nice. It also would have enabled remote collaboration, had we chosen to do that.
Why do you think we chose to make the score method in the Scoring class a class method instead of an instance method? So that we wouldn't have to create an instance of Scoring in order to use it.
Describe an example of a test you wrote for a nominal case. For player.initialize, "It 'takes a player name'. It just makes sure the name is assigned to the variable and reported when called. Easy-squeezy.
Describe an example of a test you wrote for an edge case. For the draw_tiles method for the player class, we wrote a test for situations when the tilebag did not contain enough tiles for the player to draw to get a full hand of seven. The test shows that code we wrote handles this situation fine.
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? We used many Enumberable methods in our code, including a series of chained enumerable methods within the Scoring class method self.highest_score_from. The comment in the scoring.rb files explains what it does.
What was one method you and your pair used to debug code? We made ample use of Binding.pry. Also, we read lots and lots and lots of stack traces.
Is there a specific piece of code you'd like feedback on? In order to make situations involving randomness more testable, we wound up writing the TileBag class in a way that involved passing in the hash of letter-tiles and their quantities whenever an instance was created. Apparently, that is not how other folks handled the situation. We are curious about how our solution compares with what others did, and whether there are reasons why we should have gone in a different direction.
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? 90% of the time, we worked really well together. There were a few times when one of us got super-frustrated, or when one of us when down a really unproductive rabbit hole, but we managed to pull each other back from the ledge really well, all things considered.

npeters5 and others added 30 commits February 20, 2018 14:45
…re are passing when they shouldn't. We'll see.
…les. Cleaned up the errors the retrofitting caused in the tests.
…ey over the PA. So we have that, if nothing else.
…ss to remove superfluous comments, etc., but this is basically done.
@tildeee
Copy link

tildeee commented Mar 3, 2018

Scrabble

What We're Looking For

Feature Feedback
General
Answered comprehension questions x
Both Teammates contributed to the codebase x
Regular Commits with meaningful commit messages x
Scoring class
score method x
Uses appropriate data structure to store the letter score x
Appropriately handles edge cases x
highest_score_from method x
Appropriately handles edge cases x
Test implementations for highest_score_from x
Player class
Uses an array to keep track of words played x
Uses existing code to create highest_scoring_word and highest_word_score x
Returns true or false from won? method x
Tests edge cases on the play(word) x
TileBag class
Uses a data structure to keep the set of default tiles in the bag x
draw_tiles method uses the parameter to draw a set of random tiles x
tiles_remaining method returns a count x
Tests draw_tiles edge cases x

@tildeee
Copy link

tildeee commented Mar 3, 2018

Good job!

Sorry that this feedback is so late!

Great job with the enumerables methods you've used. It helped make really clever solutions!

You all handled and tested for some tricky cases in Scoring's highest_score_from method: good job for dealing with that, a lot of people missed it.

I think the code is straightforward and lean overall. Maybe one line that got pretty long and tricky would be this one:

winning_indices = scores_array.each_with_index.select { |score, index| score == high_score }.map { |array| array[1]}

I think it makes sense overall, it just might've benefited from breaking it into two lines.

Also, in the score method, you all provided the default value "x" when using fetch:

tile_value = LETTERVALUES.fetch(letter, "x")

I think maybe a more typical default value may be false or nil.

Victoria, I know you and I talked about how you would like me to look at a specific piece of code in TileBag and unfortunately I forgot which piece of functionality. Do you mind reminding me which?

Overall, great job. Cheers!

@Lasiorhine
Copy link
Author

Lasiorhine commented Mar 5, 2018 via email

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