Skip to content

This is a Python program that generates a maze using the Depth First Search algorithm.

License

Notifications You must be signed in to change notification settings

vreabernardo/RandomMazeGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

RandomMazeGenerator

This is a simple maze generator created using Python and Pygame. It generates a maze using the Recursive Backtracking algorithm, and the user can watch as the algorithm creates the maze and navigates through the cells until it reaches the end.

Pseudocode:

Choose a starting cell at random and mark it as visited.

While there are unvisited cells:

a. Choose a random neighbor of the current cell that has not been visited.

b. If all neighbors have been visited or there are no neighbors, backtrack to the previous cell.

c. Mark the chosen neighbor as visited and remove the wall between the current cell and the chosen neighbor.

d. Set the chosen neighbor as the current cell.

Done.

About

This is a Python program that generates a maze using the Depth First Search algorithm.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages