private void ChangeScreen(ScreenState screenState)
 {
     switch (screenState)
     {
         case ScreenState.Title:
             {
                 ChangeScreen(screenState, CreateTitleScreen);
                 break;
             }
         case ScreenState.MainGame:
             {
                 ChangeScreen(screenState, CreateMainGameScreen);
                 break;
             }
         case ScreenState.GameOver:
             {
                 ChangeScreen(screenState, CreateGameOverScreen);
                 break;
             }
         case ScreenState.InGameMenu:
             {
                 ChangeScreen(screenState, CreateInGameMenuScreen);
                 break;
             }
         case ScreenState.PreviousScreen:
             {
                 currentScreen = previousScreen;
                 currentScreen.Activate();
                 break;
             }
         case ScreenState.Exit:
             {
                 game.Exit();
                 break;
             }
     }
 }
 private void ChangeScreen(ScreenState screenState, Func<Screen> createScreen)
 {
     previousScreen = currentScreen;
     if (!screens.ContainsKey(screenState))
     {
         screens.Add(screenState, createScreen());
         screens[screenState].LoadContent();
     }
     currentScreen = screens[screenState];
     currentScreen.Activate();
 }