Esempio n. 1
0
 public KeeperContainer(FluxxGameContainer gameContainer, FluxxDelegates delegates)
 {
     _gameContainer = gameContainer;
     _delegates     = delegates;
     KeeperHandList = new CustomBasicList <HandObservable <KeeperCard> >();
     CardDetail     = new DetailCardObservable();
 }
Esempio n. 2
0
 public FluxxEvent(FluxxGameContainer gameContainer,
                   FluxxDelegates delegates,
                   ActionContainer actionContainer,
                   IDrawUseProcesses drawUseProcesses,
                   IPlayProcesses playProcesses,
                   IEverybodyOneProcesses everybodyOneProcesses,
                   IRotateTradeHandProcesses rotateTradeHandProcesses,
                   IFinalKeeperProcesses finalKeeperProcesses,
                   IFinalRuleProcesses finalRuleProcesses
                   )
 {
     _gameContainer            = gameContainer;
     _delegates                = delegates;
     _actionContainer          = actionContainer;
     _drawUseProcesses         = drawUseProcesses;
     _playProcesses            = playProcesses;
     _everybodyOneProcesses    = everybodyOneProcesses;
     _rotateTradeHandProcesses = rotateTradeHandProcesses;
     _finalKeeperProcesses     = finalKeeperProcesses;
     _finalRuleProcesses       = finalRuleProcesses;
 }
Esempio n. 3
0
        public ActionContainer(CommandContainer command, IGamePackageResolver resolver, FluxxGameContainer gameContainer, FluxxDelegates delegates)
        {
            delegates.RefreshEnables = RefreshEnables;
            _command               = command;
            _gameContainer         = gameContainer;
            ActionDetail           = new DetailCardObservable();
            CurrentDetail          = new DetailCardObservable();
            YourKeepers            = new HandObservable <KeeperCard>(command);
            YourKeepers.AutoSelect = HandObservable <KeeperCard> .EnumAutoType.ShowObjectOnly;
            YourKeepers.Text       = "Your Keepers";
            YourKeepers.SendAlwaysEnable(this);
            YourKeepers.ConsiderSelectOneAsync += YourKeepers_ConsiderSelectOneAsync;
            PrivateGoals                         = new HandObservable <GoalCard>(command);
            PrivateGoals.AutoSelect              = HandObservable <GoalCard> .EnumAutoType.ShowObjectOnly;
            PrivateGoals.Text                    = "Goal Cards";
            PrivateGoals.Maximum                 = 3;
            PrivateGoals.ConsiderSelectOneAsync += PrivateGoals_ConsiderSelectOneAsync;
            //handlist hook up when necessary.
            YourCards      = new HandObservable <FluxxCardInformation>(command);
            YourCards.Text = "Your Cards";
            YourCards.ConsiderSelectOneAsync += YourCards_ConsiderSelectOneAsync;
            YourCards.AutoSelect              = HandObservable <FluxxCardInformation> .EnumAutoType.ShowObjectOnly;
            OtherHand                         = new HandObservable <FluxxCardInformation>(command);
            OtherHand.AutoSelect              = HandObservable <FluxxCardInformation> .EnumAutoType.SelectOneOnly;
            OtherHand.Text                    = "Other Player's Cards";
            OtherHand.ConsiderSelectOneAsync += YourCards_ConsiderSelectOneAsync;
            OtherHand.SendEnableProcesses(this, () =>
            {
                //if (_thisMod.FluxxScreenUsed != EnumActionScreen.ActionScreen)
                //    return false;
                if (OtherHand.Visible == false)
                {
                    return(false);
                }
                return(ActionCategory == EnumActionCategory.FirstRandom || ActionCategory == EnumActionCategory.UseTake);
            });

            TempHand                         = new HandObservable <FluxxCardInformation>(command);
            TempHand.AutoSelect              = HandObservable <FluxxCardInformation> .EnumAutoType.SelectOneOnly;
            TempHand.Text                    = "Temporary Cards";
            TempHand.ConsiderSelectOneAsync += YourCards_ConsiderSelectOneAsync;
            TempHand.SendEnableProcesses(this, () =>
            {
                return(ActionCategory == EnumActionCategory.Everybody1 || ActionCategory == EnumActionCategory.DrawUse);
            });
            Direction1 = new ListViewPicker(command, resolver);
            Direction1.ItemSelectedAsync += Direction1_ItemSelectedAsync;
            Direction1.IndexMethod        = ListViewPicker.EnumIndexMethod.ZeroBased;
            Direction1.LoadTextList(new CustomBasicList <string> {
                "Left", "Right"
            });
            Rule1 = new ListViewPicker(command, resolver);
            Rule1.ItemSelectedAsync += Rule1_ItemSelectedAsync;
            Rule1.IndexMethod        = ListViewPicker.EnumIndexMethod.ZeroBased;
            Rule1.SendEnableProcesses(this, () =>
            {
                return(ActionCategory == EnumActionCategory.Rules);
            });
            Player1 = new ListViewPicker(command, resolver);
            Player1.ItemSelectedAsync += Player1_ItemSelectedAsync;
            Player1.IndexMethod        = ListViewPicker.EnumIndexMethod.ZeroBased;
            Player1.SendEnableProcesses(this, () => CanEnableChoosePlayer());

            CardList1 = new ListViewPicker(command, resolver);
            CardList1.ItemSelectedAsync += CardList1_ItemSelectedAsync;
            CardList1.IndexMethod        = ListViewPicker.EnumIndexMethod.ZeroBased;
            CardList1.SendEnableProcesses(this, () =>
            {
                return(ActionCategory == EnumActionCategory.DoAgain);
            });
        }