/** * * @author Labview */ public class TestMaze { private static int[][] array= {{0,1,0,0,0,0,0,0,0}, {0,1,1,1,1,1,0,1,0}, {0,1,0,0,0,0,0,1,0}, {0,1,0,1,0,1,1,1,0}, {0,1,0,1,0,0,0,1,0}, {0,1,1,1,0,1,1,1,0}, {0,0,0,1,0,1,0,1,0}, {0,1,1,1,1,1,0,1,0}, {0,0,0,0,0,0,0,1,0} }; public static void main(String[] args) { //Test with MazeSolver //Maze m = new Maze(array, 8,7,0,1); //System.out.println("Maze:"); //System.out.println(m); //MazeSolver s = new MazeSolver(m); //s.solveMaze(); //System.out.println("Solution:"); //System.out.println(s.writeSolution()); //System.out.println("Path taken:"); //System.out.println(s.writePath()); //Test the left hand turn robot Maze n = new Maze(array, 8,7,0,1); LeftHandRuleSolver left = new LeftHandRuleSolver(n); left.solveMaze(); } }