Short-Sighted Burl [Python]

Hi Guys,

The below code seems to provide me with ‘Success’ but after I submit the challenge the burl chases my character down and kills them. Is this a bug or something wrong with my code?

Thank you

Collect coins and run, or else the burl will find you.

This function allows your hero take an item.

def takeItem(item):
hero.moveXY(item.pos.x, item.pos.y)

Write the function “checkTakeRun” with one parameter.

If the item exists, use “takeItem” function to take it.

Go back to the start (green mark), with or without the item.

def checkTakeRun():
if coin:
hero.moveXY(40, 12)

Don’t change this code.

while True:
hero.moveXY(16, 56)
coin = hero.findNearestItem()
hero.moveXY(64, 56)
coin = hero.findNearestItem()