dimanche 20 juin 2021

How to Make Turtle Longer

I already have an if function but I need an action to happen. How do I make a turtle longer like a snake game? I have already tried the shape size.

if player.distance(fruit) < 22:
      fruit.goto(randint(-180,0),randint(0,180))
      score = score + 1
      #Sound
      os.system("afplay Sound.wav&")
      #Writing Score
      turtle.clear()
      turtle.write(f"Score = {score}", font=("Arial", 16, "normal"))

That is my if function so far but I need to add the turtle longer code somewhere though.

Aucun commentaire:

Enregistrer un commentaire