Mission 3: Table Tennis

In Mission 3, you are going to code Table Tennis. Build two paddles, a moving ball and a simple piece of artificial intelligence (AI) to play against. The aim of the game is to keep hitting the ball back to the other paddle and to try not to miss a shot.

The game board will be a simple design. The player will use the up and down keys on the keyboard to control the paddle on the left-hand side of the screen. Every time the ball collides with a paddle, it speeds up. If the player misses a shot, the game restarts.

Do it yourself task:Your finished game

Get the finished code for your game.