Closed schrum2 closed 2 years ago
Breaking things up into multiple threads is probably the way to fix things, but I'm not sure how.
After a lot of refactoring, it has now been successfully multithreaded. Now, when playing with in game controls, it is now possible to regenerate shapes and structures, or gracefully exit. This is because a new method was added to a new thread that continuously checks for user input.
Trying to rebuild everything all of the time is both costly and a bit of a fool's errand, since the TNT explosions could wipe out all the switches so that there is no way to advance to the next generation. We need a way to just let the user do something in the console if the world gets destroyed.
Otherwise, don't bother regenerating all of the structures on every generation. Just do it as the start.