Lab 6 - Pool Ball Animation

For this lab, complete the code shown in the animation lecture. You will need to add code to detect the collision with all four “walls” at the edges of your screen. Your “ball” should bounce all around the screen! If you use an infinite loop, you can simply close the window to make the program stop.

Note

All you need to complete this lab are a few decision statements. See if you can combine them into fewer by noticing that the code you execute if the decision is true is identical in two places.