def __init__(self, x, y, toX, toY): Star.__init__(self, x, y, "red") self.xspeed = 0 self.yspeed = 0 self.fromX = x self.fromY = y self.toX = toX self.toY = toY if self.toX > self.fromX: self.xspeed = -1 if self.toX < self.fromX: self.xspeed = 1 if self.toY > self.fromY: self.yspeed = -1 if self.toY < self.fromY: self.yspeed = 1
def __init__(self, x, y): Star.__init__(self, x, y, "red") self.moveleft = True
def __init__(self, x, y, color): Star.__init__(self, x, y, color) self.moveleft = True