Skip to content

Instantly share code, notes, and snippets.

@jjlumagbas
Last active November 17, 2016 04:25
Show Gist options
  • Save jjlumagbas/0bd855bfaeee682c2694164eec530f2a to your computer and use it in GitHub Desktop.
Save jjlumagbas/0bd855bfaeee682c2694164eec530f2a to your computer and use it in GitHub Desktop.
Maze MP

Square

  • char
  • visited
  • location (int row, col)

Maze

  • 2d array of Squares

Maze()

toString

MazeSolver

Agenda a Maze m

solve() //returns solved Maze

writeSolution()

MazeSolverTester

main

    for each maze in file
        create Maze
        
        create QueueSolver
        QueueSolver.solve
        call QueueSolver.write

        create StackSolver
        StackSolver.solve
        call StackSolver.write
3
7 4
#######
#...#o#
#*#...#
#######
7 4
#######
#...#o#
#*#...#
#######
12 10
############
#.#........#
#.#.######.#
#.#....#...#
#.###.*#.#.#
#...####.#.#
#.#.#..#.#.#
#.#.#.##.#.#
#o#......#.#
############
#######
#xxx#o#
#*#xxx#
#######
#######
#xxx#o#
#*#xxx#
#######
#######
#xx.#o#
#*xxxx#
#######
#######
#xxx#o#
#*.xxx#
#######
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment