Search:

Type: Posts; User: aussiemcgr

Search: Search took 0.19 seconds.

  1. Replies
    8
    Views
    1,569

    Re: Need some help printing out my maze!

    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...
  2. Replies
    8
    Views
    1,569

    Re: Need some help printing out my maze!

    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,...
  3. Replies
    8
    Views
    1,569

    Re: Need some help printing out my maze!

    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?
  4. Replies
    8
    Views
    1,569

    Re: Need some help printing out my 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,...
  5. Replies
    8
    Views
    1,569

    Re: Need some help printing out my maze!

    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...
Results 1 to 5 of 5