Implemented the factor of friction and gravity into the BouncingBall