Skip to content

Conversation

ardder
Copy link

@ardder ardder commented Jun 27, 2013

No description provided.

blackjack.rb Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Just a detail of blackjack, but you'll also want to stand if you're exactly 21 as well.

@jwo
Copy link
Member

jwo commented Jun 27, 2013

Looks great -- let me know if my thoughts on the game.stand make sense or not.

@ardder ardder closed this Jun 30, 2013
@ardder ardder reopened this Jun 30, 2013
Copy link
Member

Choose a reason for hiding this comment

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

Good job with inject here.

@jwo
Copy link
Member

jwo commented Jul 4, 2013

In order to hide the card, I remove the attr_reader :cards and implement the new method Hand#cards.

This is a great progression in your programming --- I think it worked really well, and is one of the reasons to use attr_readers in your class. In you're using an attr_reader, you can easily promote it to a "real" method with custom logic.

Nice job on this!

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