refacto: move 'game' related code into gameEngine