Karel Level 7
Description
Part 1
Your robot has been kidnapped! The kidnappers have placed Karel in a random maze. Your job is to escape. Reach the exit, which is marked on the map with a beeper.
Maze 0
Your code must work for any possible maze!
Process
- algorithm
- A sequence of steps that solves a problem.
A maze can be solved using the following algorithm:
Imagine you are standing in a maze.
- Place your hand on the wall to your left
- Walk forward while keeping your hand touching the wall at all times
- Follow turns with your hand still on the wall
- That's it! You're done when you reach the exit
This maze has been set up so that the robot will touch every square in the maze at least once before reaching the exit, if the algorithm has been written correctly.
Part 2
Press the corresponding number key on your keyboard to load a maze listed below.
Run your algorithm on each maze to make sure it works.