Hero not moving at all.
Can someone take a look, what wrong with my code.
int main() {
// You'll need good strategy to win this one!
// Your clone will have the same equipment you have!
// But, they're not very skilled at using special powers.
while(true) {
auto e_index = 0;
auto enemies = hero.findEnemies();
while(e_index > enemies.length && hero.health > hero.maxHealth / 4){
auto enemy = enemies[e_index];
if(enemy.health > 0 && enemy.type != "sand-yak"){
hero.move(enemy.pos);
if(hero.isReady("cleave"))
hero.cleave(enemy);
else {
hero.attack(enemy);
if(hero.isReady("bash")){
hero.bash(enemy);
}else{
hero.attack(enemy);
hero.shield();
}
hero.shield();
}
if(hero.health < hero.maxHealth / 4){
break;
}
}
e_index++;
}
}
hero.moveXY(33, 71);
return 0;
}