while True:
hero.buildXY("fence", 55, 35)
hero.buildXY("fence", 40, 50)
hero.buildXY("fence", 25, 35)
hero.buildXY("fence", 40, 20)
is my currant code
while True:
hero.buildXY("fence", 55, 35)
hero.buildXY("fence", 40, 50)
hero.buildXY("fence", 25, 35)
hero.buildXY("fence", 40, 20)
is my currant code
hey try following instructions first before changing your code completely
and also
Hello and welcome to codecombat discourse! This is a cozy forum where you can share ideas, share fan art, get assistance for code, etc! Before you proceed, we hope that you review this topic, which shows all essentials of this board! Thanks!
Hello and welcome to codecombat discourse! This is a cozy forum where you can share ideas, share fan art, get assistance for code, etc! Before you proceed, we hope that you review this topic, which shows all essentials of this board! Thanks!
You have to check if where the enemy’s position is. If the enemy’s position x is greater than yours, build a fire-trap at the right X mark. If the enemy’s position x is less than your hero’s position x, you would build frie-trap on the left X mark. If the enemy’s position y is greater than your hero’s position y, then build a fire-trap at the top X mark. If the enemy’s position y is less than your hero’s position y, then you have to build a fire-trap at the bottom X mark. Then, you would need to move back to the center, so you don’t get blown up by the explosion.