Moving Basketball

Objective:To allow the user to change how fast they want the basketball to move and be able to change the color of the ball.

Problem: The ball is not bouncing of the walls correctly.

Solution:I compare my code with someone else and debug it.