Lost Viking Level - Ran out of time

Hi all,
I’m not sure if this is a bug, but I’m hoping so because even google couldn’t help me.

I solved the lost viking level: the hero reached the end of the maze alive. But then he stays there, until the game inform me that I ran out of time. I tried adding a moveXY to the skeleton position, but nothing.

Seems to be working, could you put your code up - maybe with it hidden (see FAQ for using a details section), and we’ll have a look

LostVikingCode
# How many sideSteps north of the Red X you've taken.
sideSteps = 1
# How many steps east of the Red X you've taken.
steps = 1
# Multiply this with steps to determine your X coordinate. DON'T CHANGE THIS!
X_PACE_LENGTH = 4
# Multiply this with sideSteps to determine your Y coordinate. DON'T CHANGE THIS!
Y_PACE_LENGTH = 6

SWITCH = 5
SKIP = 7
SLIDE = 9
goingSouth = False
sideStepsMade = 1 # total sidesteps
# The maze is 35 steps along the X axis.
while steps <= 35:
    self.moveXY(steps * X_PACE_LENGTH, sideSteps * Y_PACE_LENGTH)
    if sideStepsMade % SWITCH == 0:
        goingSouth = not goingSouth
    # Increment steps and sideSteps as appropriate, taking into account the special rules.
    steps += 1
    sideStepsMade += 1
    # sideSteps amount
    if goingSouth == True:
        sideSteps -= 1
    else:
        sideSteps += 1
    # wrap around sideSteps
    if sideSteps > SLIDE:
        sideSteps = 1
    elif sideSteps < 1:
        sideSteps = SLIDE
    # add a side step
    if steps % SKIP == 0:
        if goingSouth == True:
            sideSteps -= 1
        else:
            sideSteps += 1

Hmm, I tried the code you had, and didn’t make it to the end. I made a couple of changes, to use steps in deciding whether to go north or south. And then moved the step increment to the end of the while block. That then seemed to work ok.
Let me know if I’ve not being very clear - just trying to be helpful without just laying out some code :smile: I can always be clearer…

1 Like

I’m having the same problem, and i make it to the end : P
Here’s My code:

self.moveXY(25,35)
self.moveXY(45, 10)
self.moveXY(50, 35)
self.moveXY(55, 10)
self.moveXY(70, 25)
self.moveXY(75, 25)
self.moveXY(87, 8)
self.moveXY(93, 35)
self.moveXY(105, 39)
self.moveXY(109, 9)
self.moveXY(120, 20)
self.moveXY(130, 9)
self.moveXY(135, 35)
self.moveXY(150, 30)
self.moveXY(140, 30)

(Simple, huh?)

You aren’t supposed to moveXY to the different positions manually; the goal of the level is to create a formula that calculates the next position to which to move. It sounds complicated (and indeed is), but can be solved with perseverance. Good luck!

(It still gets me to the end, the problem is I can’t finish it.)

I know, but I don’t think you can pass the level if you don’t do it the way you are supposed to.

Hi,

Im running out of time, i don’t know what to do…

/!\ deleted code for no copy / paste solution /!\

Ok, i just see im using -2 speed boots, a +2 boots seem to be ok, i think it could be cool to mention this in help ! :x