Extracted base game logic in new class Engine, added encapsulation, applied Singleton to the Engine.