In my module which is highly automated I need to recreate main object that runs the game if the old game was closed and a new loaded or started. I would like to know how to detect a game was closed.
Without that the old object tries to work in a new environment, while it’s handles to various game pieces are of course invalid and this causes bugs.