Skip to main content
Top

2010 | OriginalPaper | Chapter

Rock, Paper, Scissors

Author : Jeannie Meyer

Published in: The Essential Guide to HTML5

Publisher: Apress

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

In this chapter, you learned how to implement a familiar game using features of HTML5, JavaScript, and CSS, along with general programming techniques. These included

styles, in particular the font-family property

form and input fields for displaying the score

event handling using addEventListener for the mouse click event

animation using setInterval and clearInterval

audio elements for sound and source elements for working with different browsers

getElementByTagname and play for specific control of audio clips

programmer-defined objects for drawing programmer-created buttons on the screen, with logic for determining if the mouse cursor was clicked on a specific button

arrays of arrays for game rules

The next chapter describes another familiar, childhood game: Hangman. It combines techniques of drawing on canvas and creating HTML elements using code that you have learned in previous chapters along with some new CSS and JavaScript features.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Metadata
Title
Rock, Paper, Scissors
Author
Jeannie Meyer
Copyright Year
2010
Publisher
Apress
DOI
https://doi.org/10.1007/978-1-4302-3384-8_8

Premium Partner