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

[SOLVED]Help: The Final Kithmaze

The level is titled The Final Kithmaze and I’m stuck on it. Below is my code. If you could help, that’d be great. Thanks!
while True:
hero.findNearestEnemy()
hero.moveRight()
hero.moveUp()
hero.moveRight()
hero.movedown
hero.moveDown()
enemy=hero.findNearestEnemy

2 Likes

Hey girl :3
could you please help us out by formatting your code with the button that looks like this </>
Thank you * woof *

5 Likes

compare these. check which one’s right.

also, please format your code corectly like @xXWolfieXx said.

3 Likes

use it like below

you need to use a if loop to check if there is an enemy and attack it.

EDIT : also next time, pls format your code like @xXWolfieXx and @CocoCharlie said
image
check the importance of formating in here :

2 Likes

@WaWa_Yang you don’t get if until forest. It just lets you get away with it in dungeon.

1 Like

sorry coders i forgot, i used something like

hero.attack(hero.findNearestEnemy)
1 Like