|
let mut tries = 0; |
|
loop { |
In chapter 40, there is an update to the code of WaveformCollapseBuilder (introduced in chapter 33).
It adds a try limit to the solver loop to avoid an infinite (or at least a very long) loop.
(Not sure, but I think the additional lines to clear spawn_list, rooms, and corridors after making a copy of the map are also part of the fix).
However, this is not mentioned anywhere in the chapter (or in the book), so people will have to power through the following chapters with a level generation that breaks regularly.