Random Perfect Maze Generator with C++





Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Feb 12, 2010

I have written a simple program in C++ that randomly generates a perfect maze using Depth-First Search (DFS) algorithm. A perfect maze is defined as a maze which has one and only one path from any point in the maze to any other point. This means that the maze has no inaccessible sections, no circular paths, no open areas.

Double array of structs was used for the navigation grid in X and Y coordinates, stacks was used to back-track the path by popping the last position, and ofstream was used to output and save the generated maze into a specified file.

  • Category

  • License

    • Standard YouTube License


When autoplay is enabled, a suggested video will automatically play next.

Up next

to add this to Watch Later

Add to

Loading playlists...