-
Notifications
You must be signed in to change notification settings - Fork 45
Feature: Completed all examples #39
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
base: master
Are you sure you want to change the base?
Conversation
Open your
I generally prefer that a player can
What about stacking the deck to an order of your choosing (such as 10, 2, 10) and having the player hit? should bust, right? |
if @player_hand.value > 21 | ||
stand | ||
else | ||
status(:unstood) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could not have the else block here.
Or, more in the language of the game:
if @player_hand.value > 21
bust!
end
Just repushed. How's this? The only thing that doesn't work is that rspec Best wishes, Danny Bradbury On 10 February 2014 18:42, Jesse Wolgamott [email protected] wrote:
|
@@ -0,0 +1,40 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
man, these .idea
files are the worst.
Hi Jesse. I've completed the Panda, Tiger, Eagle examples. Please let me know how I did.
A couple of things:
I'm a bit unsure how to cope with the .idea file issue you mentioned. I'm guessing I'm pushing lots of supporting files used by my IDE to the repository, which must be annoying - could you help me with that by telling me how to get git to ignore them?
To complete the Eagle example I had to tell the Game.status method when someone had stood. So I called Game.status with a passed symbol, which was normally :unstood to indicate that no one had stood (forcing it to hide the cards). If Game.status was invoked from Game.stand, it was passed the :stood symbol, which told it that the game had been stood. Then it knew to reveal the dealer cards. However, all this meant that I had to change every method call to Game.stood, which seems inefficient and clunky.
What is a better way?
Onward and upward! Thanks.