HTML and CSS Reference
In-Depth Information
provided in the download pack from www.friendsofed.com , or your own sounds. Note that youll need to
change the file names in the code to match the sound files you use.
This is a situation in which we want to use special graphics for the player moves. Figure 8-1 shows the
opening screen of the application, consisting of three graphics that serve as buttons, as well as a field
labeled with the string “Score:” that holds an initial value of zero.
Figure 8-1. The Rock, Paper, Scissors opening screen
The player makes a move by clicking one of the symbols. Lets look at an example with the player clicking
on the rock icon. Well assume the computer chose scissors. After a short animated sequence in which a
scissors symbol starts small and grows on the screen, a text message appears as shown in Figure 8-2. In
the version with added audio, the audio clip would play a sound corresponding to a rock crushing a
scissors. Notice that the score is now 1.
Figure 8-2. The player threw rock and computer threw scissors
 
Search WWH ::




Custom Search