Skip to content

Conversation

jamlevi
Copy link

@jamlevi jamlevi commented Sep 18, 2012

Better Late Than Never

Copy link
Member

Choose a reason for hiding this comment

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

I recommend not leaving commented code in your code.

Also, the use of a class level variable here doesn't make sense (@@). Just use a CONSTANT instead.

@jwo
Copy link
Member

jwo commented Sep 18, 2012

Two things I'd change for either this or future code:

  1. don't leave commented code in your code. Delete away ... and if you want a history: commit, then delete
  2. there's a method called suit --- you could just call "to_s" on a symbol to get it as a string... But also, I would have rather seen this on a Card object itself, and a case statement would be better than a if/else/else
case suit
when :clubs
"C"
when :diamonds
"D"

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