We will start our journey with PCG by using a search algorithm as a starting point for creating mazes. We will use the foundations acquired in Chapter 2, Navigation, and twist them a little, to create mazes.
Creating mazes with Depth-First Search
Getting ready
For the graph, we will use the grid representation, and Boolean values to define whether a cell is a wall or not, respectively.
How to do it...
We will comprise everything in just a class that will handle the abstract representation, called DSFDungeon:
- Define the DFSDungeon component and its member values:
using...