May-02-2018, 09:27 PM
I am writing python code inside Turtle import. I am making a program where one turtle chases another turtle. I want my Turtle player to change colors if the other turtle catches up to him. Right now I have created a function:
Any advice you could give would be appreciated. If you would like the whole code I can give it. Just let me know.
def collision_decision(): if chaser.pos() = player.pos(): player.color("orange","green") else:I am trying to set it so that when both turtles have the same position (when the chaser turtle has caught up with the player) that my player turtle changes colors. However, now my code won't run and it says it doesn't recognize the line "if chaser.pos() = player.pos():"
Any advice you could give would be appreciated. If you would like the whole code I can give it. Just let me know.