Bones in the Maze

The mazes have bones in them, even in dead ends. The editor holds the right-hand rule from the last exercise. Add to it so that the dog picks up all the bones on its way.

Programmers rarely write programs from scratch. They take a program that works and extend it with something new. What matters is not to break what already worked. So after every change, try the program on all the maps again.

The right-hand rule has a useful property: on its way, the dog also walks through the dead ends on its right-hand side. So it won't miss the bones in them. It just has to check on every tile whether there's a bone there, as in the A Path with Bones exercise.

Instructions

Pick up all the bones on all the maps.

Walk to the goal.

Start programming for free

By signing up, you agree to the Terms of Service and Privacy Policy.

Or sign up with:

2/3