I will note that even with the above sudo-code, it will lead to infinite recursions if you have a large open area without walls. The only way to avoid that would be by marking your previous...
Type: Posts; User: aussiemcgr
I will note that even with the above sudo-code, it will lead to infinite recursions if you have a large open area without walls. The only way to avoid that would be by marking your previous...
1. Computer Science? Hopefully your college is better than mine. I came in as a Computer Science major and then changed to Computer Engineering because the conceptual crap was kicking my ass. Ok,...
Three questions.
1) Have you ever done recursion, and if so, how much?
2) What are the variables: r and c?
3) Are you calling the findPath(...) method before or after you print out the maze?
That probably won't work, since you are overwriting wall several times here:
wall = findPath(r+1, c); // down
wall = findPath(r, c+1); // right
wall = findPath(r-1, c); //up
wall = findPath(r,...
You have two problems.
First, is that your call to System.out.println(A[x][y]); occurs immediately after you read in an int. Meaning that it will just print out the int you inputted immediately...