Double Agent Done wrong [SOLVED]

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
image
image
image
image

@dedreous can you handle this one?

@Tv264, post your code and let us have a look…

here is my code

    # 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.

the reason im posting is not for help but beacuse even if the middle is the wrong one i still suceed

Oh, ok…so you bully your way thru then?

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

1 Like

my only problem doing the level correctly is figuring out how to get "place"s y pos

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.)

no i am using thrain

@Tv264, you need your pet to first moveXY to place

and i think he’s tharin :rofl:

Ok, that would be:similar to how you determined the pet’s coords. Only no ‘pos’ this time…simply place.x and place.y.

Edit to test solution buttons.

or place.pos (20 chars)

thanks my problem was using pos thanks for the help
now i can beat the level with out a cheat:)

edit the title please :smile:

Or, even better, check the Solution box on the post that you feel helped you the most.

@Tv264, can you do what dedreous said please

that box disappeared after i changed the title im not sure how to check the box now