//when goal is scored this function restores the initial position of the ball
when goal is scored this function restores the initial position of the ball
// when goal is scored this function restores the initial position of the ball
func (ball *ball) reset(goal int) {
	if goal == 1 || goal == 2 {
		sdl.Delay(2000)
		ball.X = float64(boxWidth / 2)
		ball.Y = float64(boxHeight / 2)
		ball.Yv = BallSpeedY
		if goal == 2 {
			ball.Xv = -BallSpeedX
		} else if goal == 1 {
			ball.Xv = BallSpeedX
		}
	}
}
func ( ball * ball ) reset ( goal int ) { if goal == 1 || goal == 2 { sdl . Delay ( 2000 ) ball . X = float64 ( boxWidth / 2 ) ball . Y = float64 ( boxHeight / 2 ) ball . Yv = BallSpeedY if goal == 2 { ball . Xv = - BallSpeedX } else if goal == 1 { ball . Xv = BallSpeedX } } }
when goal is scored this function restores the initial position of the ball
when goal is scored this function restores the initial position of the ball