Skip to content

Conversation

ellesuzuki
Copy link

No description provided.

Copy link
Member

Choose a reason for hiding this comment

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

in Ruby, it's called a Hash (short for hash-map, I know, but people will know what you mean with hash). Map is typically used for map-reduce (as in over a collection)

Also, instead of suits_map[suit], I'd recommend

suits_map.fetch(:suit)

This way, fetch will will raise an exception if suit is somehow missing.

@jwo
Copy link
Member

jwo commented Nov 24, 2012

Looks good! One more suggestion: write a test for the busted? method --- that's a part of the game's workflow and would be best served under test.

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