public CousinRummyMainViewModel(CommandContainer commandContainer, CousinRummyMainGameClass mainGame, CousinRummyVMData viewModel, BasicData basicData, TestOptions test, IGamePackageResolver resolver, CousinRummyGameContainer gameContainer ) : base(commandContainer, mainGame, viewModel, basicData, test, resolver) { _mainGame = mainGame; _model = viewModel; _gameContainer = gameContainer; _model.Deck1.NeverAutoDisable = false; _model.PlayerHand1.AutoSelect = HandObservable <RegularRummyCard> .EnumAutoType.SelectAsMany; var player = _mainGame.PlayerList.GetSelf(); mainGame.Aggregator.Subscribe(player); //hopefully this works now. _model.TempSets.Init(this); _model.TempSets.ClearBoard(); //try this too. _model.TempSets.SetClickedAsync += TempSets_SetClickedAsync; _model.MainSets.SetClickedAsync += MainSets_SetClickedAsync; _model.MainSets.SendEnableProcesses(this, () => { if (_mainGame !.OtherTurn > 0) { return(false); } return(_mainGame.SingleInfo !.LaidDown); });
public CousinRummyMainGameClass(IGamePackageResolver mainContainer, IEventAggregator aggregator, BasicData basicData, TestOptions test, CousinRummyVMData currentMod, IMultiplayerSaveState state, IAsyncDelayer delay, ICardInfo <RegularRummyCard> cardInfo, CommandContainer command, CousinRummyGameContainer gameContainer) : base(mainContainer, aggregator, basicData, test, currentMod, state, delay, cardInfo, command, gameContainer) { _model = currentMod; _command = command; _gameContainer = gameContainer; _gameContainer.ModifyCards = ModifyCards; _rummys = new RummyProcesses <EnumSuitList, EnumColorList, RegularRummyCard>(); }
public PhaseSet(CousinRummyGameContainer gameContainer) : base(gameContainer.Command) { _gameContainer = gameContainer; }