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

Wini and Caroline - Scrabble - Octos #11

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

Conversation

cmn53
Copy link

@cmn53 cmn53 commented Feb 23, 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 is helpful to be able to switch back and forth between each others' computers, and it's nice to be able to make changes when we are not at Ada and share them with one another.
Why do you think we chose to make the score method in the Scoring class a class method instead of an instance method? It is a class method because we don't actually need to create any instances of the class Scoring, we just need to pass words as arguments to the scoring methods.
Describe an example of a test you wrote for a nominal case. We tested that initializing a new tilebag would create and instance of new Tilebag with and array of tiles.
Describe an example of a test you wrote for an edge case. We tested words that do not exist in the English language but somehow have six letters that would beat a seven letter word.
Does your code use any methods from the Enumerable mixin? If so, where and why was it helpful? Yes, in scoring we used the select method to remove any words that were less than 7 letters if a 7-letter word was present in the array. There were a couple other places where we could have used them, but we thought it would be more fun to implement the check_word method instead.
What was one method you and your pair used to debug code? We used binding.pry to see if the draw_tiles method was removing a tile during each iteration.
Is there a specific piece of code you'd like feedback on? It seems like the Player#play method has a lot of functionality. We would like to know if it would have been better to include some of those steps in other or additional methods.
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? We talked about how we both had something to give to one another on the project. We talked about how we disliked writing tests, but at the end we understood why it was helpful, and in particular, how it helped to write them first to understand the problem and what we were trying to achieve with each method. We also talked about how our different paces helped each other in different ways. We enjoyed working with each other.

@CheezItMan
Copy link

Scrabble

What We're Looking For

Feature Feedback
General
Answered comprehension questions Check
Both Teammates contributed to the codebase Both partners committed!
Regular Commits with meaningful commit messages Good number of commits and overall good commit messages
Scoring class
score method Check
Uses appropriate data structure to store the letter score Well done
Appropriately handles edge cases Check
highest_score_from method Check
Appropriately handles edge cases Check
Test implementations for highest_score_from Check
Player class
Uses an array to keep track of words played Check
Uses existing code to create highest_scoring_word and highest_word_score Check
Returns true or false from won? method Check
Tests edge cases on the play(word) Check
TileBag class
Uses a data structure to keep the set of default tiles in the bag Check
draw_tiles method uses the parameter to draw a set of random tiles Check
tiles_remaining method returns a count Check
Tests draw_tiles edge cases Missing one edge case if they try to draw more tiles than are in the bag.
Summary Nicely done, you hit all the learning goals on this project. Good use of Enumerables and great work, for the most part, on checking edge cases. Let me know if you have a question on my feedback.

end
end

def check_word(word)

Choose a reason for hiding this comment

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

Neat!

i = @tiles.find_index(letter)
@tiles.delete_at(i || @tiles.length)
end
if won?

Choose a reason for hiding this comment

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

I would check to see if you won before deleting tiles from the player's hand.

end
end

describe "total score" do

Choose a reason for hiding this comment

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

It would also be a good idea to test that total score doesn't go up if the player keeps playing past winning.

player_1.won?.must_equal true
end

it "returns false if total score is equal to 100" do

Choose a reason for hiding this comment

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

Good edge case

end
end

describe "highest_scoring_word" do

Choose a reason for hiding this comment

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

What about highest_scoring_word when no words have been played?

attr_reader :tilebag

def initialize
@tilebag = ["A", "A", "A", "A", "A", "A", "A", "A", "A",

Choose a reason for hiding this comment

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

Good Choice!


it "includes 1 Q tile" do
new_game = Scrabble::Tilebag.new
new_game.tilebag.select{ |tile| tile == "Q" }.length.must_equal 1

Choose a reason for hiding this comment

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

Niiiiice!

end
end

describe "draw_tiles" do

Choose a reason for hiding this comment

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

What about if they try to draw more tiles than are in the bag?

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