I, personally, don’t know whether this is intentional, but the intention of the level is to make you write a function that removes certain types of the enemies. What is your code?
The level is just a bit hard, so I kind of needed this trick to finish it consistently. I did finish it, but then when I submitted it I had less luck. I have 1733 hp and boots of speed, but a bad weapon. My character is Anya.
He doesn’t need to say it, he is saying it to debug why it doesn’t match enemy.type == “ogre”
Yes, type is probably the best way to go, but if your sense stone allows it you could do maxHealth (click on the ogres on screen and point at their health bar to see the values yourself, or say them of course)
[details= ]
Programatically, you could make an end run around obfuscated mob-types, find the ones with health X and store the type in a variable then use that variable in your code.[/details]
I think I understand why I they would want to discourage me to use the types of enemies. This must be because they do not want you to build up the array of “real enemies” by using findByType on the different types of enemies. Removing the yaks makes the code more stabile and reusable, as you do not have to know in advance what kind of enemies there will be.
I would think that a message in the guide or a comment in the code about this would be helpful.
Yngvi, I was actually thinking about that. It beats writing a isAnagramOf function. But I also agree with Feinty that this is may not be the best exercise.