The current framework is meant to be hacked and changed. Most custom stuff can go into separate files and functions, but they then hard-coded into the simulation.
An alternative would be to have a pluggable system, that calls different functions depending on some setting. This would force a better architecture for the framework and also allow running tests (as a special type of game "simulation").
On the other hand, it would be difficult to have a framework that is flexible enough to allow simulating a wide enough range of games without hacking it.
All custom code is now moved into a modules object, making it possible to switch to a completely different simulation by switching module name. Default is "example".
The current framework is meant to be hacked and changed. Most custom stuff can go into separate files and functions, but they then hard-coded into the simulation.
An alternative would be to have a pluggable system, that calls different functions depending on some setting. This would force a better architecture for the framework and also allow running tests (as a special type of game "simulation").
On the other hand, it would be difficult to have a framework that is flexible enough to allow simulating a wide enough range of games without hacking it.
Worth thinking about.