Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

What would I need to code for Ice Life? It keeps saying "either your code is really slow or has an infinite loop"

innerField = [
        [0,0,0,0,0,0,0,0,0,0],
        [0,0,0,1,0,0,0,0,0,0],
        [0,0,0,0,1,0,0,0,0,0],
        [0,0,0,0,0,1,0,0,0,0],
        [0,0,0,0,0,0,1,0,0,0],
        [0,0,0,0,0,0,1,0,0,0],
        [0,0,0,0,0,1,1,0,0,0],
        [0,0,0,0,0,0,0,0,0,0]
        ]

hero.findNearestEnemy().initField(innerField)
while True:
    hero.wait(60)

/\ my code

Did you read the guide and hints?

Yes, and it didn’t help.