On the Double Agent level i managed to beat the level doing it incorectly.
by just having my pet move to the middel x
using this code
pet.moveXY(2, pet.pos.y)
and following it i can beat the level.
1st condition when I submit the middle path happens to be the correct path
2cnd condition (just clicking run and not submit) the ogres are still there but i get knocked around and codecombat decides that i did it correctly
pics below show steps on what happens
# Use passagePosByNum to find the passage to enter:
place = passagePosByNum(HNum)
# Move the pet to the entrance of the passage:
#pet.moveXY()
# Move the pet to the left edge of the map:
pet.moveXY(2, pet.pos.y)
MOD edit: Full code removed so that this cannot be used as a solution.
Rather ingenious workaround…as I think you mentioned in the other post, you have to get lucky and get the seed that goes to the center, but, it does work. So, to fix that. The only problems I see with your code are here:
# Move the pet to the entrance of the passage:
#pet.moveXY()
# Move the pet to the left edge of the map:
pet.moveXY(2, pet.pos.y)
Just before these, you define ‘place’. In the first move statement, which you commented out, use the x,y attributes of variable to move the pet to the correct passage (row). Then, in the second move, use the y attribute of place.
i think there is a bug with the level . i am posting so that that bug might get fixed if developers for code combat see this .
i did beat the level but i am still trying to do it right so your help is aprecciated
Gotcha and thanks for being honest! I doubt the devs will see this, but even so, it would likely take a very long time to see the fix.
I just ran your code with my hero (Anya) maxed out in health and had to submit three times before I got a seed that was not in the center. I got stomped and she died. Are you using Okar by change? (I’ve not bothered to unlock him yet.)