Replacing dx and dy variables with tempBallPosition object
Replacing x and y with ballPosition object
Moving brick collision detection code into dedicated function
Moving logic to detect whether the ball has hit a wall to dedicated
function
Moving logic to detect whether the ball has fallen out of bounds into
its own function