public void Init(A8RoundRummyGameContainer gameContainer)
 {
     _roundList = gameContainer.SaveRoot !.RoundList;
     _roundList.CollectionChanged += RoundList_CollectionChanged;
     _thisStack = new StackLayout();
     PopulateList();
     Content = _thisStack;
 }
        private readonly A8RoundRummyGameContainer _gameContainer; //if not needed, delete.

        public A8RoundRummyMainViewModel(CommandContainer commandContainer,
                                         A8RoundRummyMainGameClass mainGame,
                                         A8RoundRummyVMData viewModel,
                                         BasicData basicData,
                                         TestOptions test,
                                         IGamePackageResolver resolver,
                                         A8RoundRummyGameContainer gameContainer
                                         )
            : base(commandContainer, mainGame, viewModel, basicData, test, resolver)
        {
            _mainGame      = mainGame;
            _model         = viewModel;
            _gameContainer = gameContainer;
            _model.Deck1.NeverAutoDisable = true;
        }
        private bool _wasNew; //hopefully okay.

        public A8RoundRummyMainGameClass(IGamePackageResolver mainContainer,
                                         IEventAggregator aggregator,
                                         BasicData basicData,
                                         TestOptions test,
                                         A8RoundRummyVMData currentMod,
                                         IMultiplayerSaveState state,
                                         IAsyncDelayer delay,
                                         ICardInfo <A8RoundRummyCardInformation> cardInfo,
                                         CommandContainer command,
                                         A8RoundRummyGameContainer gameContainer)
            : base(mainContainer, aggregator, basicData, test, currentMod, state, delay, cardInfo, command, gameContainer)
        {
            _model         = currentMod;
            _command       = command;
            _gameContainer = gameContainer;
        }
        public A8RoundRummyMainView(IEventAggregator aggregator,
                                    TestOptions test,
                                    A8RoundRummyVMData model,
                                    A8RoundRummyGameContainer gameContainer
                                    )
        {
            _aggregator = aggregator;
            _model      = model;
            _aggregator.Subscribe(this);
            _gameContainer = gameContainer;
            _deckGPile     = new BaseDeckXF <A8RoundRummyCardInformation, A8RoundRummyGraphicsCP, CardGraphicsXF>();
            _discardGPile  = new BasePileXF <A8RoundRummyCardInformation, A8RoundRummyGraphicsCP, CardGraphicsXF>();
            _score         = new ScoreBoardXF();
            _playerHandWPF = new BaseHandXF <A8RoundRummyCardInformation, A8RoundRummyGraphicsCP, CardGraphicsXF>();
            _roundControl  = new RoundUI();
            StackLayout             mainStack = new StackLayout();
            ParentSingleUIContainer?restoreP  = null;

            if (test.SaveOption == EnumTestSaveCategory.RestoreOnly)
            {
                restoreP = new ParentSingleUIContainer(nameof(A8RoundRummyMainViewModel.RestoreScreen));
            }

            Grid grid2 = new Grid();

            AddLeftOverColumn(grid2, 65);
            AddLeftOverColumn(grid2, 40); // can adjust as needed
            AddControlToGrid(grid2, mainStack, 0, 0);
            AddControlToGrid(grid2, _roundControl, 0, 1);



            StackLayout otherStack = new StackLayout();

            otherStack.Orientation = StackOrientation.Horizontal;
            otherStack.Children.Add(_deckGPile);
            otherStack.Children.Add(_discardGPile); // can reposition or not even have as well.
            var thisBut = GetGamingButton("Go Out", nameof(A8RoundRummyMainViewModel.GoOutAsync));

            otherStack.Children.Add(thisBut);
            mainStack.Children.Add(_playerHandWPF);
            _score.AddColumn("Cards Left", true, nameof(A8RoundRummyPlayerItem.ObjectCount)); //very common.
            _score.AddColumn("Total Score", true, nameof(A8RoundRummyPlayerItem.TotalScore));
            SimpleLabelGridXF firstInfo = new SimpleLabelGridXF();

            firstInfo.AddRow("Turn", nameof(A8RoundRummyMainViewModel.NormalTurn));
            firstInfo.AddRow("Status", nameof(A8RoundRummyMainViewModel.Status));
            firstInfo.AddRow("Next", nameof(A8RoundRummyMainViewModel.NextTurn));
            mainStack.Children.Add(firstInfo.GetContent);
            mainStack.Children.Add(otherStack);
            mainStack.Children.Add(_score);


            _deckGPile.Margin = new Thickness(5, 5, 5, 5);

            _discardGPile.Margin = new Thickness(5, 5, 5, 5);

            if (restoreP != null)
            {
                mainStack.Children.Add(restoreP); //default add to grid but does not have to.
            }
            Content = grid2;
        }