Next we need to break down enough walls that the maze is fun and challenging while also ensuring that there is a correct path from the start to the end.
We'll use some randomness so that the maze is new and fun each time!
Randomness is fun, but it can be tough to debug your application if each time you run it, it behaves slightly differently. We'll add an optional "seed" parameter that can be toggled on and off to ensure that the randomness behaves the same everytime when seeded. It will only be used for testing and debugging.
The fixed seed can be anything, say 0, but because its fixed, it will ensure you always get the same "random" numbers when you use the random library. Once you're done debugging and want randomness for your application, you can just leave the seed parameter blank in main to get real randomness again.
Once you have implemented the changes above, run your code to see the maze generation in action. If everything is working properly, each run with the same seed should produce identical mazes, while using no seed will result in a different maze each time.
Here's my pseudo code for the __break_walls_r method:
Login to Complete
Login to view solution