Login

Maze solver (Java)

School project
Finished
13 September 2006

Oblig 2:

In this assignment you will be given some source code, but this code will only generate a random labyrinth with 20 x 20 squares.
There is only one way through the generated labyrinth, and your assignment is to create a method that find the way through all the random generated labyrinths.

The way to do this is to use a backtracking algorithm. To do this you start in a given point (1 x 1 box) and then try to go one way (left, right, up, down).
If you dont hit a wall we can go there, and do the entire check again. If you suddenly can't go anywhere, then go back to your previous point, and try the next direction on your list.
This way you will eventually go through the entire labyrinth and find the right way.

The grade that will be given is approved/not approved.

Grade given: Approved

You have to be logged in to download the project files!
If you are interested in the project files then contact me