Move logic to GameEngine class