HTML and CSS Reference
Listing 6.13. game.js—Mouse controls
Step 3: Add touch support
Adding touch support to your game requires only six additional lines of code. What's even
better is that you don't have to modify your existing objects. Just drop the code from the
next listing into the Ctrl object and Boom!, touch support is added.