Moving logic to detect whether the ball has hit the paddle into its own
function
Moving check whether ball is near paddle into its own function
Renaming tempBallPosition to ballSpeed