HTML and CSS Reference
Figure 10-6. The Super Turbo Hungry Fridge screen
This is obviously out of scope of this chapter, but you can see the full source code of Hungry Fridge on GitHub and
fiddle with it however you like. You can freely fork, modify, and benefit from the source code of the game—especially if
you want to see the Gamepad API in action and eventually implement some of the code in your own game.
I hope that after reading this chapter and trying the brief examples, you will want to test the material out by
creating a game with Gamepad API support or implement this support in an existing game. You've learned how to
listen for gamepad-specific events, how to detect the controller connection, how your program should react upon
disconnecting a controller, and how to tell the difference between buttons and analog sticks.
I also covered an example game, Hungry Fridge, which uses the Gamepad API implementation described in the
chapter. This gives you a base of knowledge about the Gamepad API that you can use right away, even though the
specification hasn't been officially published. All you have to do is to try it out yourself. Good luck and have fun!