Activity

Ablag

I added the code for setup, and steps of Dijkstra’s algorithm and also edited the render function to be able to render the solution. Also added the key detection for “D” key where if it it pressed then the solution will start provided that the maze has been generated.

In this code, the green part is the part generated by the DFS maze generation and the blue part is the cells explored by dijkstra’s algorithm and the line is the “solution”.

But there is a bug on this, it does show an solution but it is not the correct one, like it goes over the maze walls. I will need to fix that. ( you can see the problem in the image attached)

Attachment
0
Ablag

Changed the code such that the state switching for different cases ( generating and idle before) from a boolien to a enum to add multiple cases for adding different algorithm.
Added code for nodes, shortest distance to cells, and other variables needed for some maze solving algorithms.

Attachment
0
Ablag

I added two boxes indicating the starting and end point of the maze and added the keypress of “R” key resetting the maze, recreating a maze.

Attachment
0
Ablag

I made a simple version of my project that is generating maze using DFS.

It takes a grid and uses DFS to choose a random side and then go though there then again check if there are any open sides and if not then the process repeats making the mazes.

Attachment
0