Skip to content

Conversation

@jackiewatanabe
Copy link

Scrabble

Congratulations! You're submitting your assignment.

Comprehension Questions

Feature Feedback
How do you feel you and your partner did in sharing responsibilities? We both agree we switched off pretty well. One partner would work on the code until we got through one concept, then we'd push and let the other partner take over for the next concept. We had no merge errors! Although we did run into one thing when pulling while we were working remotely, but that turned out to be a minor user error.
Why do you think we chose to make the score method in the Scoring class a class method instead of an instance method? Because the rules of scrabble scoring don't belong to a particular instance of a game of scrabble, so there's no need to initialize a Scoring class to get the score.
Describe an example of a test you wrote for a nominal case. when testing the highest_score_from class method, we put in an array of words ([ "blue", "gum", "bumble", "feet"]) that contained one word that's a clear winner ("bumble") to make sure the method selected "bumble" as the winning word
Describe an example of a test you wrote for an edge case. To test the edge case of that same method, we tried putting in an empty array to make sure it would raise an Argument Error if there were no words.
What was your final test coverage percentage? 100%! Yay!
Is there a specific piece of code you'd like feedback on? It was difficult to try and make sure our draw_tiles method actually was selecting random tiles, but Addie was brilliant in coming up with a test to check if the tiles drawn were mostly random. We'd love some feedback on the test (it "drawing tiles from different tilebags (usually) returns different tile arrays" do ) in the tile_bag_spec file. Is drawing from new bags 50 times considered an ok way to test?

add2point71dots and others added 30 commits February 27, 2017 14:30
…if it returns highest scoring word from array
add2point71dots and others added 21 commits March 1, 2017 13:14
…string...added argument errors to initialize
… played and highest_scoring_word, highest_word_score are called.
… is an array and has the right number of tiles
…orking on tests to check for randomness of tiles
… is an integer and one or more. Added argument errors in draw_tiles method to raise errors
@kariabancroft
Copy link

Scrabble

What We're Looking For

Feature Feedback
General
Answered comprehension questions Yes. Wow, no merge conflicts! Impressive!
Both Teammates contributed to the codebase Yes. Appears to be every other commit (or so) in the git history
Regular Commits with meaningful commit messages Commits are frequent and the messages are meaningful
Scoring class
score method
Uses appropriate data structure to store the letter score Yes. Used a CSV file to load the letters and loaded into a hash.
Appropriately handles edge cases Yes. Nice job with exceptions related to bad input.
Tests score edge cases (one-letter word, 7 letter word) Yes. Has 4 tests to cover edge cases. Nice!
highest_scoring_word method
Appropriately handles edge cases Yes. Ensures there is at least one word to score. Overall, this method is pretty inefficient. You would essentially score each word in the array up to three times. If this array got especially large, this would take a longer and longer amount of time. How would you refactor to ensure that each word in the array only needed to be scored one time?
Tests highest_scoring_word edge cases (ties, no words, no array) Yes. Covers empty array, ties and special case for shorter words.
Player class
Uses an array to keep track of words played Yes
Uses existing code to create highest_scoring_word and highest_word_score Yes
Returns true or false from won? method Yes. Nice & clean - one line!
Tests edge cases on the play(word) method for words that cannot be scored Yes - utilizing the code written in the Scoring class to test the argument errors
TileBag class
Uses a data structure to keep the set of default tiles in the bag Yes - using an array.
draw_tiles method uses the parameter to draw a set of random tiles Yes. Note: You can pass a parameter to the pop method to pop off the number you want so that would remove your need for the times loop and the tiles_drawn variable.
tiles_remaining method returns a count Yes
Tests draw_tiles edge cases for different parameter inputs Yes. Really nice job with the edge cases. I do like the effort in the tests for ensuring that the drawn tiles are unique. Though, it feels like the tests are a bit arbitrary (using a 50 or 13 times loop) which makes me think that they aren't ideal. Testing randomness is fundamentally difficult, so I think I would stick with the other tests you have, and additional check that each element in the returned array is a string, but not much more to ensure the random behavior.

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