Elf Minder 9000

Difficulty: ❄ ❄ ❄ ❄
Assist Poinsettia McMittens with playing a game of Elf Minder 9000.

Hints

Elf Minder 9000: RTD (Read the Docs)

From: Poinsettia McMittens
Be sure you read the “Help” section thoroughly! In doing so, you will learn how to use the tools necessary to safely guide your elf and collect all the crates.

Elf Minder 9000: Reusable Paths

From: Poinsettia McMittens
Some levels will require you to click and rotate paths in order for your elf to collect all the crates.

Elf Minder 9000: TODO

From: Poinsettia McMittens
When developing a video game-even a simple one-it’s surprisingly easy to overlook an edge case in the game logic, which can lead to unexpected behavior.

Silver trophy

To get the silver trophy, it was sufficient to complete the first 12 levels.

Sandy Start

Waves and Crates

Tidal Treasures

Dune Dash

Coral Cove

Shell Seekers

Palm Grove Shuffle

Tropical Tangle

Crate Caper

Shoreline Shuffle

Beachy Bounty

Driftwood Dunes

Gold trophy (A Real Pickle)

The gold trophy required a little bit more creativity, and a lot of dead ends on the edit parameter :)
Analyzing the JS code, I noticed the usage of Local Storage to save and load data about the current game. These data are saved as a JSON with two fields: entities representing objects inserted by the user and segments which contains the paths designed by the player.
Entities mapping can be found at the beginning of guide.js:

1
2
3
4
5
6
7
8
9
10
const EntityTypes = {
START: 0,
END: 1,
CRATE: 2,
BLOCKER: 3,
HAZARD: 4,
STEAM: 5,
PORTAL: 6,
SPRING: 7,
};

Observing the segments array, it’s possible to notice that to cross each block 2 segments are needed. For instance, this array represents a path crossing horizontally this block:

1
[[[2,3],[3,3]],[[3,3],[4,3]]]

With this in mind and not a lot of space to add a useful object in “A Real Pickle”, I tried to leverage on the border of the block to place a tunnel modifying directly the Local Storage data and it worked:

1
2
3
4
{
"segments":[[[1,1],[2,1]],[[2,1],[3,1]],[[7,1],[8,1]],[[8,1],[9,1]],[[9,1],[9,2]],[[9,2],[9,3]],[[8,7],[7,7]],[[7,7],[7,6]],[[7,6],[7,5]],[[7,5],[6,5]],[[6,5],[5,5]],[[5,5],[5,4]],[[5,4],[5,3]],[[10,9],[11,9]],[[4,5],[3,5]],[[3,5],[3,6]],[[3,6],[3,7]],[[3,7],[2,7]],[[2,7],[1,7]],[[9,7],[8,7]]],
"entities":[[3,1,7],[1,7,6],[10,9,6],[9,3,7]]
}

Funsies

game.disappointHackers();

Yep, I noticed that function