elara icon indicating copy to clipboard operation
elara copied to clipboard

Do I need to break the "comment rule" to get the challenge star in level 8?

Open lukmarcus opened this issue 9 months ago • 1 comments

In level 8, to get the challenge star, I need to Reach the goal in 17 steps or fewer. Is it even possible to do this without breaking the comment rule and by this I mean // ADD YOUR CODE BELOW:?

Because to earn this star I need to edit the code before this comment and make some changes in the suggested moves for the first crate. I finally made it to finish in 16 moves.

Solution

Change from this:

// This time there is more than one crate in the way. The code
// below moves the first crate out of the way, but there is still
// one more to go!
move_forward(3);
turn_left();
pick_up();
turn_left();
move_forward(2);
drop();
// ADD YOUR CODE BELOW:

Into this:

// This time there is more than one crate in the way. The code
// below moves the first crate out of the way, but there is still
// one more to go!
move_forward(3);
turn_left();
pick_up();
turn_left();
// WRITE YOUR CODE BELOW
move_forward(2);
drop();

lukmarcus avatar Feb 26 '25 19:02 lukmarcus

Hi @lukmarcus, the comment // ADD YOUR CODE BELOW: is meant to be a suggestion not a hard rule. You can change or delete any of the initial code/comments if you want to, and it may sometimes be necessary to do so for solving challenges.

I can see how this might be confusing though. Leaving this issue open while I think about rephrasing this to make it more clear 🙂 .

albrow avatar Feb 26 '25 19:02 albrow