Are you sure?
Do you want to delete “fgh” permanently? You will not be able to undo this action.
import icons
class Cannabis:
def __init__(self, p1, p2, color="red"):
self.ball = icons.Cannabis(width=30, height=30,
x=100-p2, y=p1, color=color)
self.points = [(p1, p2), (p2, p1),
(p1, 100-p2), (100-p2, p1)]
self.position = 0
def change_location(self):
self.ball.x = self.points[self.position][0]
self.ball.y = self.points[self.position][1]
self.position = self.position + 1
ball1 = Cannabis(50, 85)
ball2 = Cannabis(50, 15, color="green")
ball3 = Cannabis(20, 10, color="blue")
ball4 = Cannabis(60, 30, color="aquamarine")
for i in range(4):
with animation(duration=0.8):
ball1.change_location()
ball2.change_location()
ball3.change_location()
ball4.change_location()