16.1. The Airhockey game
The Airhockey game is inspired by the table game of the same name. The user slides the player piece around and tries to knock the puck into the opponent’s goal. The opponent, which is run by the computer program, tries to knock the puck into the player’s goal. In order to make the game more challenging, neither the player nor the opponent can move across the center line of the playing field.
We show a picture of it below. The ball with the triangular tail is the player, this critter is controlled by moving the mouse. The puck is the round critter, and the enemy is a robot player with an icon based on a photo of the author’s face.
The Airhockey game. ‘Robot’ sprite is a picture ...