Level Help-Middle Point (combo challenge) Computer Science 2

I need help with surviving for 30 seconds.

while True:
hero.moveXY(32, 34)
hero.moveXY(32, 16)
enemy = hero.findNearestEnemy()
if enemy:
hero.buildXY(“fire-trap”, 32,52)
hero.buildXY(“fire-trap”, 32,34)
hero.buildXY(“fire-trap”, 32,16)

Hero won’t survive for 30 seconds.

Hi @Xerxes_Gandhi and welcome to the forum! :partying_face: This is a friendly place where you can ask help on levels, report bugs, or just chat with other coders! Don’t forget to read the guidelines if you haven’t yet. Have a great time!

Can you please format your code using this button to be able to help:

1 Like

can you give me the link please?