/*
 * This program solves a simple maze escape problem.  The maze is configured so
 * that the robot can escape if it simply moves forward whenever it can do so, or
 * turns left and then moves when way is blocked.  A total of 20 moves is required
 * to escape from the maze
 *
 * @author: Russell C. Bjork
 * @version: January 9, 2006
 *
 */
 
import kareltherobot.*;

       
public class Maze implements Runnable, Directions
{
    public static void main(String [] args)
    { 
    	World.readWorld("Maze.world");
    	World.setVisible(true);
        World.setupThread(new Maze());
        World.setTrace(false);
        World.showSpeedControl(true);
    }
      
    public void run()
    {
        SimpleEscaperRobot karel = new SimpleEscaperRobot(4, 5, North, 0);
        karel.escape();
		karel.turnOff();
	}
}
