Skip to content

finished up to tiger level #27

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

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

Conversation

dramanat
Copy link

@dramanat dramanat commented Mar 6, 2013

I'd like to do the eagle level, but don't want to get too far behind. Will come back to it.

@jwo
Copy link
Member

jwo commented Mar 6, 2013

This looks great! I had to search to try and find suggestions.

@@ -14,7 +14,7 @@ def value
end

def to_s
"#{@value}-#{suit}"
"#{@value}#{(suit.to_s.chars.first.upcase)}"
Copy link
Member

Choose a reason for hiding this comment

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

This is getting a little unwieldy. Could be better to either:

  1. Have a Suit class with its own to_s method (lots of work)
  2. Offload this logic to another method, like display_suit
def to_s
  [@value, display_suit].join('-')
end

def display_suit
  suit.to_s.chars.first.upcase
end

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