Using python for the Loop Da Loop level, I am getting an error and fail. The code is working, but it is failing because it is not under 6 statements (in fact, it is 4 statements). While I am wearing better gear than the level was intended for, this should still pass:
loop:
gem = self.findNearest(self.findItems())
if gem:
self.moveXY(gem.pos.x, gem.pos.y)
Also of note, when wearing upgraded boots, the gem check seems to be required, simplified movement loops have you going too fast, eventually you try to pass the laser and die.
Why, when I put this into a loop, is it more than 6 statements?
enemy = self.findEnemies()[0]
if enemy.target:
self.move(Vector.subtract(Vector(40,40), enemy.target.pos))
Ok - really weird. Just went back to the level and the same code which had failed now reports success. Ugh.
And when I reloaded the level, this went back to failing the 6 statement test. Double ugh.