public class Maze
{
// public static char map[][];
public Maze(int row, int col, char map[][])
{
Main.row = row;
Main.col = col;
Main.map = map;
System.out.println(map[row][col]);
}
public boolean excape(int row, int col)
{
boolean exit = false;
if(isValid(row, col))
{
Main.map[row][col] = Main.WALL;
if (row == Main.map.length-1 && col == Main.map[0].length-1)
exit = true; //the maze is solved
else
{
exit = excape(row+1, col); //down
if (!exit)
exit = excape(row, col+1); //right
if (!exit)
exit = excape(row-1, col); //up
if (!exit)
exit = excape(row, col-1); //left
}
}
return exit;
}
public boolean isValid(int row, int col)
{
if(row <9 || col< 9 )
{
}
return true;
}