/// <summary>
 /// getInstance method
 /// </summary>
 /// <param name="uiStateModel"></param>
 /// <returns>Instance of a GameEndViewModel</returns>
 public static GameEndViewModel getInstance(UiStateModel uiStateModel)
 {
     if (_instance == null)
     {
         _instance = new GameEndViewModel(uiStateModel);
     }
     return(_instance);
 }
 /// <summary>
 /// Constructor which initializes the viewmodels with a uIStateModel
 /// </summary>
 public MainViewModel()
 {
     viewmodels.Add("Login", new LoginViewModel(uiStateModel));
     viewmodels.Add("ServerList", ServerListViewModel.getInstance(uiStateModel));
     viewmodels.Add("GameLobby", GameLobbyViewModel.getInstance(uiStateModel));
     viewmodels.Add("CreateSession", CreateSessionViewModel.getInstance(uiStateModel));
     viewmodels.Add("Game", GameViewModel.getInstance(uiStateModel));
     viewmodels.Add("Editor", EditorViewModel.getInstance(uiStateModel));
     viewmodels.Add("GameEnd", GameEndViewModel.getInstance(uiStateModel));
     uiStateModel.OnUiStateChanged += changeToView;
     CurrentViewModel = viewmodels["Login"];
 }