public BasicCardGamesVM(CommandContainer commandContainer, ICardGameMainProcesses <D> mainGame, IBasicCardGamesData <D> viewModel, BasicData basicData, TestOptions test, IGamePackageResolver resolver ) : base(commandContainer, mainGame, viewModel, basicData, test, resolver) { _mainGame = mainGame; _model = viewModel; _basicData = basicData; _model.Deck1.DeckClickedAsync += Deck1_DeckClickedAsync; _model.Pile1.PileClickedAsync += ProcessDiscardClickedAsync; //hint: main deck will be a registered item (will go to the vmdata that is backing this that anything can access with no overflow errors). _model.Deck1.SendEnableProcesses(this, (() => CanEnableDeck())); _model.Pile1.SendEnableProcesses(this, (() => CanEnablePile1())); if (AlwaysEnableHand() == false) { _model.PlayerHand1.SendEnableProcesses(this, () => { return(CanEnableHand()); }); _model.PlayerHand1.IsEnabled = false; // start with false } else { _model.PlayerHand1.SendAlwaysEnable(this);// will handle this part } _model.PlayerHand1.Text = "Your Cards"; _model.PlayerHand1.ObjectClickedAsync += ProcessHandClickedAsync; //done. _model.PlayerHand1.ConsiderSelectOneAsync += OnConsiderSelectOneCardAsync; //done _model.PlayerHand1.BeforeAutoSelectObjectAsync += BeforeUnselectCardFromHandAsync; //done _model.PlayerHand1.AutoSelectedOneCompletedAsync += OnAutoSelectedHandAsync; //done. }
public TrickCardGamesVM(CommandContainer commandContainer, ICardGameMainProcesses <T> mainGame, IBasicCardGamesData <T> viewModel, BasicData basicData, TestOptions test, IGamePackageResolver resolver) : base(commandContainer, mainGame, viewModel, basicData, test, resolver) { }