/** * Initializes the mazes appropriately, then calls the printing/solving function afterwards * * @param args -- nothing * @return -- nothing */ public static void main(String[] args) { easyMaze.initializeMazes(easyMaze, medMaze, toughMaze); Nodes brutalNodeMaze[][] = brutalMaze.convertMaze( brutalMaze.theMaze, brutalMaze.theMaze.length, brutalMaze.theMaze[0].length); brutalMaze.nodeMaze = brutalNodeMaze; printMazes(easyMaze); }
/** * Actually solves the maze, and prints out the unsolved and solved versions of it * * @param tbpMaze -- the maze 'to be printed' */ public static void printMazes(Mazes tbpMaze) { tbpMaze.drawMaze(); DJikstraSolving mazeCaller = new DJikstraSolving(); char[][] mazeSol = mazeCaller.solveTheMaze(tbpMaze); for (int j = 0; j < tbpMaze.width; j++) { for (int i = 0; i < tbpMaze.height; i++) { System.out.print(mazeSol[i][j]); } System.out.println(); } }