Lost Viking Guide Suggestions

We tried to switch the problem description to 0-based as we were working on it, but found it was even more difficult that way (I forget why–maybe because of the remainder-instead-of-modulo thing).

If you already know some programming and want to try to do this level with modulo/remainder, you can, but it’s actually a lot easier to solve with simple if/else to do the bounds. We are not trying to teach modulo here; if we were, it would be a teaching level, not a challenge puzzle level. We are going to teach it soon, and it’ll be something like repeating your buildTypes based on how many guys you’ve built so that you can do soldier, archer, archer, soldier, archer, archer, etc.

What do you do with the SWITCH and the SLIDE and the SKIP

The comments you get clearly state to look in the Help. Everything is explained there. If you have any question after reading that, clearly state what exactly is your problem, with codesnippet of the problem (and only the problem).

This is exactly what I understood when I solved the puzzle. Modulo isn’t necessary in the SLIDE part. Not at all. Even more : trying to use modulo will make your solving so much worse than a couple of very simple if/then statements. Which is why I gave that negative feedback in my first post :

because if I were my hero about to get off boundaries, I would SWITCH (turn back) to stay continuously in the interval. The whole idea of “if sideSteps = 1 then sideSteps = SLIDE” (+ the opposite) opens the way to try and use a modulo (it’s even suggested in the SWITCH and SKIP part !). And if the final idea is only to tell players to use a simple If/then, I’d rather use this SLIDE rule : (again take this with a grain of salt. Just trying to provide constructive feedback)

if( sideStep = 1 ) {
    sideStepIncrement =  ( - 1 ) * sideStepIncrement ; // (SWITCHing)
}
if( sideStep = SLIDE ) {
    sideStepIncrement =  ( - 1 ) * sideStepIncrement ; // (SWITCHing)
}

Anyway, again the level is awesome. Difficult but very nice. I’m just trying to point out that some of the difficulty is partly unecessary to me. In the near future, I’ll try to provide ideas to segment the difficulty surrounding some traps around the use of modulos. (which is one of the goal for Cloudrip Mountain. I didn’t explore any level past the one that requieres Pender, I don’t have enough gems yet to purchase her.)

Yea, awesome idea. I think I saw that already in SkySpan. That was awesome. Inspired some of my tournament code. I’ll try to provide more ideas like this one. Maybe some of them will be good enough.

A few of my kids have attempted this level, so I’ve seen it here and there. Now there are giant flowers where there were none previously. None of my kids like the flowers (out of 90+ students and I’m not exaggerating here–literally, none of the students like them). It is glitchy (some keep flickering on/off) and it makes it very hard to see the level map when there are these enormous flowers all but hiding the map.

The level definitely has some important concepts, so I am excited for the students to have a crack at it.

Why is it that I don’t have the viking session? Many of my students have it, but I do not.

Sorry about that - the flowers were always there, but they were very small. The gigantic flowers were an unintended side effect of another change :slight_smile: It should be fixed now.

1 Like

Is there a reason why I can’t see the viking ship in my world?

Interesting level!
The most confusing part in the Guide is about SKIP and Boundaries.
In the way Boundaries are explained, it seems natural to check them just before the move, but this does not work since SKIP needs to actually ignore boundaries checks, which is not exactly intuitive
(it even explicitly contradicts the rules: “You must stay within 1 to 10 sideSteps north of the Red X”).
As Boundaries are explained after SKIP, it also makes the process to find the right position for the SKIP check rather difficult.

Also, “you must sideStep TWICE” is really unclear, what is “to sideStep” ?

This one is supposed to be a HARD level, not in the “oh, no, I have to kill 1000 brawlers” sense, but in the “twist/wrap your brain around the requirements” sense…

SKIP and Boundries:

Skip and Boundry are defined differently. [quote][Boundry] within 1 to 10 **sideSteps** SKIP = #, when the number of **steps**[/quote] What does "Boundry" mean: [quote]You must stay **within 1 to 10 sideSteps** north of the Red X.[/quote] Does "*within*" mean inclusive or exclusive [quote]If you are about to take a *sideStep* **greater than 10**, you should instead SLIDE south to **1 sideStep** north of the Red X.[/quote] As you can see the next paragraph of the guide told you, which.

sideStep:

The guide clearly defines "sidestep" (at least in English. I would expect the translation to be similar, if not let us know which language and we'll try to get it looked at. You also seem to understand its implication of N/S distance for the "Boundry" so??) [quote]

Moving North-South

For each **step** *east* you take, you must also **sideStep** one pace to the *north* (along the Y axis).[/quote] *sideStep = step ... as you ...* [quote]Since SWITCH = #, when the number of **steps** you have taken is divisible by #, you SWITCH to **sideSteping** south instead of north. (The #th step will be to the north, the (#+1)th to the south, then keep **sideSteping** south until you hit another SWITCH).[/quote] definition has been expanded/improved. *sideStep = step ...or... as you ...*

So “sideStep TWICE” means…

(Hopefully, I successfully told you where to look to find and answers and not just flat out told you . . . as I said (to paraphrase) the hardness of the level is wrapping the brain around the requirements, and then code it up.) If it is too hard then the box where you poke play suggests: [quote][…] come back to this one later.[/quote]

I have this same issue: Manyof my students (not all, interestingly enough) have this level, but I do not.

I think this is a more general issue than just Lost Viking. I’ll try to answer with my understanding of what’s happening, as I solved this problem myself.

Lost Viking is unlocked on a specific level in the forest. You, as a teacher, might already have beaten the campain before you told your student to create a CodeCombat account. Lost Viking was created after you beat the campain, and wasn’t auto unlocked on your account (as it is checked on the Victory Screen).

However, your students who started from scratch, unlocked everything on their path in their own campain. So I redid the first few levels around every level I know it exists. For LostViking, I resent the 5 first levels of the forest and the level was unlocked.

Every time you see the number of level has changed in a World (top part of the screen) like in the Mountain, which is changing rapidly those days, you might have to resend your code to make sure it unlocks the new levels. Worked for me. Hope it will for you.

2 Likes

BINGO! I think it unlocked after only 4 levels, but that’s what triggered the level to appear. Thanks!

Hi guys. Please explain to me what’s going on. I am using javascript and I do not understand where to write these your switch, slide and skip.
To the initial level:

var sideSteps = 35;
var steps = 35;
var X_PACE_LENGTH = 4;
var Y_PACE_LENGTH = 6;
while(steps <= 35) {
    this.moveXY(steps * X_PACE_LENGTH, sideSteps * Y_PACE_LENGTH);    
    steps++;
}

Apparently switch, slide and skip written inside the container while, but I do not understand how. Set an example code on Javascript.
Thank you.

Yup, just like the default instructions tell you, you put the logic in side your while loop.

// Increment steps and sideSteps as appropriate, taking into account the special rules.

That is what you do . . . you write if this, if that, increment this, decrement that type statements to determine what to do next…

This is supposed to be a hard level. If it is too hard then the box where you poke play suggests: […] come back to this one later.

this is my code so far:

SLIDE = 9
SWITCH = 5
SKIP = 7
[1,1]-[2,2]-[3,3]-[4,4]-[5,5]-SWITCH-[6,4]-[7,3]- SKIP-[8,1]-SLIDE-[9,9]-[10,8]-[11,9]-SLIDE-[12,1]-[13,2]
self.moveXY(24, 37)
self.moveXY(42, 12)
self.moveXY(50, 31)
self.moveXY(56, 11)
self.moveXY(71, 29)
self.moveXY(86, 12)
self.moveXY(93, 37)
self.moveXY(106, 38)
self.moveXY(108, 13)
self.moveXY(123, 24)
self.moveXY(133, 25)
self.moveXY(136, 37)
self.moveXY(143, 35)

While you have part of the idea, I think you may have missed the point of the level. I would suggest that you reset the level code (using the “reload” button), then use the variables they created. The trick is correctly incrementing your variables the right amounts at the right times. It’s hard and took me a while. Don’t give up, though! Persistence wins the day!

Here’s a hint for posting code: Write or paste it, highlight it, then click the “</>” button. This formats it as you wrote it, spacing and all. For example:

if self.canSpeak:
    self.say("This is how forum code looks!")

May you please help me?

Post your Code . Use Button Preformatted text.