• Jeannie Meyer


In this chapter, you learned how to implement a card game using features of HTML5, JavaScript, and CSS along with general programming techniques. These included
  • Generating a set of Image objects based on names of external files

  • Designing a programmer-defined object for cards, incorporating the Images

  • Drawing images and text on the screen

  • Making use of for, while, and if to implement the logic of blackjack

  • Using calculations and logic to generate the computer’s moves

  • Establishing event handling for the keydown event so that the player could indicate a request to deal a new card, hold, or start a new game and using switch to distinguish between the keys

  • Using the header and footer elements, new to HTML5, for directions and giving credit to sources

This is the last chapter of this book. I hope you take what you have learned and produce enhanced versions of these games and games of your own invention. Enjoy!


Image Object Switch Statement Card Game Creative Common License Card Image 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© by Jeanine Meyer 2010

Authors and Affiliations

  • Jeannie Meyer

There are no affiliations available

Personalised recommendations