import random
class dot:
    colors = ["red","green","blue","pink","orange","gray","white","yellow","aqua"]
    speeds = [-3,-2,-1,1,2,3]
    def __init__(self,x,y):
        self.x = x
        self.y = y
        self.c = random.choice(dot.colors)
        self.radius = random.randint(5,10)
        self.dx = random.choice(dot.speeds)
        self.dy = random.choice(dot.speeds)
    def draw(self,c):
        c.create_oval(self.x,self.y, (self.x + 2*self.radius),(self.y + 2*self.radius),fill=self.c)

    def move(self,xlimit,ylimit):
        self.x += self.dx
        self.y += self.dy
        if self.x >= xlimit or self.x < 0:
            self.dx = -self.dx
        if self.y >= ylimit or self.y < 0:
            self.dy = -self.dy
            
            
        
        
    
