SLU-CS-Capstone / how-we-work-wr_desktop

how-we-work-wr_desktop created by GitHub Classroom
0 stars 0 forks source link

Allow to generate repeatable mazes #2

Open izakrobles opened 1 year ago

izakrobles commented 1 year ago

The maze generated by this code is randomized. This randomization happens in src/generator.py get_spanning_tree function. Whenever you run the code, the generated maze will likely be different. That's a nice feature, that we would like to preserve. However, it would also be nice to be able to repeatably generate the same maze, by supplying a seed value for the random number generator and initializing the random number generator with that seed. We can optionally pass the seed value to the get_spanning_tree function. If the seed value is passed, we would initialize the random number generator with that seed, otherwise, we would do what the current code is doing.