robinamasio/blackjack — pull request #2 by robinamasio (2014-10-07 05:11:53+00:00)
Title: dealer logic & outcome

This change set addresses the following user stories:

“As a player, I want to stand, So that I don't bust”

“As a dealer I want to continue hitting until my score is at least 17
So that I get close to 21 without too much risk of busting.”

This required:

- more CSS styles for messages regarding wins, loses and draws
- a template for when either the player or dealer chooses to stand
- a template for the outcome of a hit for the dealer
- a template for the outcome of the game
- logic for the dealer’s decision to stand: if the dealer’s total is
less than 17, the dealer must hit. Otherwise, the dealer must stand.
In either case, appropriate logic for wins, loses and ties was needed.

in addition, I added a “to-dealer” CSS style to give a darker visual
look to the hits that the dealer receives.