Friday, March 15, 2019

Adding a Paddle to Bouncing Ball

In the previous post we created the Bouncing Ball example. We will be adding a paddle to the Bouncing Ball example here, so that we can make it a bit interactive to play with. I have changed the title from Bouncing Ball to Paddle Ball. I have also changed the screen size to have more room to play. The images for the icon, ball and the paddle are given below the code. You can download them and put them in the same folder where you save the code.

Code:


Graphic for the icon:


Graphic for the ball:


Graphic for the paddle:


Output:


No comments: