The Essential Guide to HTML5

(Greg DeLong) #1

CHAPTER 10


dependent on the presence of aces). Similarly, our game does declare a tie if the player and house have
the same total if the total is under 21; some casinos may have a different practice.


An opening screenshot is shown in Figure 10-1.


Figure 10-1. Opening screen for blackjack


After the user presses the n key, the next screen would look something like Figure 10-2. Remember that
there are random processes involved, so this same set of cards is not guaranteed to appear each time.


Figure 10-2. Cards dealt

Free download pdf