- Modify the bouncing ball script by adding a rectangle sprite that is controlled by the user’s touch. The rectangle sprite should be wider than it is tall and should initially be located at the bottom-center of the screen. The sprite’s y position should never change from its initial value. The sprite’s x position, however, should be set to the x coordinate of the user’s touch. 
- Modify the script to make the rectangle sprite and the bouncing sprite interact. Use the - sprite→overlaps withfunction inside the- add on every frameinline-function to test if the two sprites are overlapping. Note, do not use the- sprite→overlap withfunction. When the two sprites are overlapping, change the bouncing sprite’s speed as if it hit the bottom of the screen.
- Modify the script so that if the ball reaches the bottom of the screen, the game is over. Use the - game→endfunction to end the game.
Submission
Please show your source code and run your scripts for the instructor or lab assistant.