• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 32. GAMES > CREATING A BLACKJACK GAME

CREATING A BLACKJACK GAME

Implementing a card game, such as blackjack, is a far more difficult task than creating the games in the previous examples in the chapter. Even the following program, which does not take into account common blackjack rules such as splitting and doubling down, has a lot more Lingo code to it.

Figure 32.9 shows how this game can be complex. Two sets of cards are shown: the dealer's, at top, and the player's immediately below. Six decks are used, and any number of cards can be in each hand—up to 11 if the player or dealer draws all 2s. Below the cards, several text fields show the player's total cash, the player's bet, the player's hand value, the dealer's hand value, and an additional message. There are also three buttons (Deal, Hit, and Stay), as well as an editable text field that enables the player to enter a bet.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint