A challenging Engineering Programming problem
I created a maze inserted in a 2D-Array, and I need a solution of a method called FindS which finds the starting point in the maze and a method called solve to solve the maze whether to go up, down, right , left, using ListStack implementation!!
solve() needs S --> findnext()
go up, down, right, left --> stack(S);
if found--> stack.pop();
while(!solved && !stack is empty()) --> repeat
public Pointer FindS( char S)
{
}
public boolean solve()
{
}
This is my pointer class:
public class Pointer {
int row, col;
int x,y;
public Pointer(int X, int Y, int r, int c ){
x=X;
y=Y;
row=r;
col=c;
}
public void setX(int X)
{
x=X;
}
public int getX()
{
return x;
}
public void setY(int Y)
{
y=Y;
}
public int getY()
{
return y;
}
public void setrow(int r)
{
row=r;
}
public int getRow()
{
return row;
}
public void setCol(int c)
{
col=c;
}
public int getCol()
{
return col;
}
}