This repo contains the source files for the random generation of a maze through the use of Disjoint Set data structures, implemented using union by rank and path compression techniques.
The main files that build up the project are:
- Tile.h: class that represents the tiles of the maze, and that acts as a disjoint set.
- Maze.h: class that represents the maze, containing a matrix of tiles.
- main.cpp: the entry point of the program, contains an instance of the class Maze and the call of its method for the execution of the random maze generation algorithm.
Graphic.h, GraphicState.h, MenuLoop.h and Game.h are respectively used for the graphic presentation of the maze generation.
The code is entirely written in C++ programming language, with the use of the following libraries and APIs (omitting the standard ones):
- random: used for the random selection of wall to be removed inside the maze
- chrono: used for the presentation of the maze generation
- SFML 2.5.0 graphic library
Checkout the benchmarks of the implementation here!