This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Why, hello there! I have a problem you see, I need to use a recursive solution to solve a maze (you've all done that, right? ). Anyway, the problem I have is the return statement. Here is an example
I have to return an arrayList of rooms that have the solution, I declared,
I have to return an arrayList with rows and columns. I made an arrayList called Roomsready, that will add the current rooms, and then call the method again to do it again, and thus keep adding the rooms up to the solution. Thus, with that code, if the NorthWall is open, I am suppose to move to the NorthWall adjacent room, and then check if their a soulution, if their are any open walls their. If not, return to the previous room and check for another wall. South, West, etc. ...Anyone?
Oh, this is my error message:
The arraylist is defined as:
I want to return that arraylist. [ November 08, 2002: Message edited by: Mario Martinez ]