def ball_update(self):
    canvas.move(self.shape, self.speedx, self.speedy)
    pos = canvas.coords(self.shape)
    if ((pos[2] >= WIDTH) or (pos[0] <= 0)):
        self.speedx *= (- 1)
    if ((pos[3] >= HEIGHT) or (pos[1] <= 0)):
        self.speedy *= (- 1)
def ball_update(self):
    canvas.move(self.shape, self.speedx, self.speedy)
    pos = canvas.coords(self.shape)
    if ((pos[2] >= WIDTH) or (pos[0] <= 0)):
        self.speedx *= (- 1)
    if ((pos[3] >= HEIGHT) or (pos[1] <= 0)):
        self.speedy *= (- 1)