Revert "Revert "fixed game management""

This reverts commit 03987be9b76071819968602c3febe5e35b54ecef.