[Python] Running turtles simultaneously with turtle graphics [duplicate]

Discussão em 'Python' iniciado por Stack, Janeiro 21, 2025.

  1. Stack

    Stack Membro Participativo

    How can I make 4 different turtles move at the same time? Also, how to make a person shape for the Turtle.shapemethod? I know there's a Screen method called register_shape, but I couldn't find any documentation on it.

    def turtles(self, base):
    self.t4.goto(self.tFirst)
    self.t1.goto(self.tSecond)
    self.t2.goto(self.tThird)
    self.t3.goto(self.tHome)
    if base >= 2:
    self.t4.goto(self.tSecond)
    self.t1.goto(self.tThird)
    self.t2.goto(self.tHome)
    if base >= 3:
    self.t4.goto(self.tThird)
    self.t1.goto(self.tHome)
    if base == 4:
    self.t4.goto(self.tHome)


    tFirst, tSecond an tThird are positions, and t1, t2, t3, t4 are turtles. I want all of the turtles to move in unison.

    Continue reading...

Compartilhe esta Página