HTML and CSS Reference
Listing 6.11. game.js—Removing bricks
Now that the paddle can deflect the ball back toward the bricks, players have the ability to
defend themselves. Well, not exactly. You still haven't given players the ability to control
the paddle. Whipping up a little bit of window event magic, we'll give you some simple
code recipes to create keyboard, mouse, and touch functionality—the second group of tasks
in this section.
6.3.3. Creating keyboard, mouse, and touch controls
To create an interactive game experience, keyboard, mouse, and/or touch input is required.
Although you could build controller detection into your Game object, we'll have you build