O'Reilly logo

Sams Teach Yourself Object Oriented Programming in 21 Days, Second Edition by Anthony Sintes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16. Blackjack Iteration 2: Adding Rules

Yesterday you performed the initial analysis and design of a Blackjack game. Today you will continue that process and add additional rules to the Blackjack game.

Today you will learn how to

  • Model the Blackjack game states

  • Use states to remove conditional logic

Blackjack Rules

Yesterday you built a simple Blackjack game. The game that you designed and built dealt cards and allowed a player to play until he either stood or busted. A real Blackjack game will do a bit more. In a real Blackjack game, aces are worth 1 or 11 points. Players can get blackjack, bust, standoff, lose, or win. A dealer won’t even play if all of the players bust or he is dealt a blackjack hand.

Today you will add the necessary logic ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required