public async Task ChooseCardAsync()
        {
            if (ActionContainer.IndexPlayer == -1)
            {
                throw new BasicBlankException("Must have the player chosen in order to use what you take from another player");
            }
            await BasicActionLogic.ShowMainScreenAgainAsync();

            await FluxxEvent.CardChosenToPlayAtAsync(ActionContainer.OtherHand.ObjectSelected(), ActionContainer.IndexPlayer);
        }
        public async Task ChooseCardAsync()
        {
            if (ActionContainer.OtherHand !.ObjectSelected() == 0)
            {
                await UIPlatform.ShowMessageAsync("Must choose a card");

                return;
            }
            await BasicActionLogic.ShowMainScreenAgainAsync();

            await FluxxEvent.FirstCardRandomChosenAsync(ActionContainer.OtherHand.ObjectSelected());
        }
Esempio n. 3
0
        public async Task DiscardRulesAsync()
        {
            await BasicActionLogic.ShowMainScreenAgainAsync();

            if (ActionContainer.Rule1 !.SelectionMode == ListViewPicker.EnumSelectionMode.SingleItem)
            {
                await FluxxEvent.RuleTrashedAsync(ActionContainer.IndexRule);

                return;
            }
            await FluxxEvent.RulesSimplifiedAsync(ActionContainer.TempRuleList !);
        }
        public async Task DrawUseAsync()
        {
            if (ActionContainer.TempHand !.ObjectSelected() == 0)
            {
                await UIPlatform.ShowMessageAsync("Must choose a card");

                return;
            }
            await BasicActionLogic.ShowMainScreenAgainAsync();

            await FluxxEvent.CardToUseAsync(ActionContainer.TempHand.ObjectSelected());
        }
Esempio n. 5
0
        public async Task GiveCardsAsync()
        {
            CustomBasicList <int> thisList;

            if (ActionContainer.TempHand !.AutoSelect == HandObservable <FluxxCardInformation> .EnumAutoType.SelectOneOnly)
            {
                if (ActionContainer.TempHand.ObjectSelected() == 0)
                {
                    await UIPlatform.ShowMessageAsync("Must choose a card to give to a player");

                    return;
                }
                thisList = new CustomBasicList <int>()
                {
                    ActionContainer.TempHand.ObjectSelected()
                };
                await BasicActionLogic.ShowMainScreenAgainAsync();

                await FluxxEvent.ChoseForEverybodyGetsOneAsync(thisList, ActionContainer.IndexPlayer);

                return;
            }
            if (ActionContainer.TempHand.HowManySelectedObjects > 2)
            {
                await UIPlatform.ShowMessageAsync("Cannot choose more than 2 cards to give to player");

                return;
            }
            int index        = ActionContainer.GetPlayerIndex(ActionContainer.IndexPlayer);
            int howManySoFar = GameContainer.EverybodyGetsOneList.Count(items => items.Player == index);

            howManySoFar += ActionContainer.TempHand.HowManySelectedObjects;
            int extras = GameContainer.IncreaseAmount();
            int mosts  = extras + 1;

            if (howManySoFar > mosts)
            {
                await UIPlatform.ShowMessageAsync($"Cannot choose more than 2 cards each for the player.  So far; you chose {howManySoFar} cards.");

                return;
            }
            var finalList = ActionContainer.TempHand.ListSelectedObjects();

            thisList = finalList.GetDeckListFromObjectList();
            await BasicActionLogic.ShowMainScreenAgainAsync();

            await FluxxEvent.ChoseForEverybodyGetsOneAsync(thisList, ActionContainer.IndexPlayer);
        }
        public async Task ChoosePlayerAsync()
        {
            await BasicActionLogic.ShowMainScreenAgainAsync();

            await FluxxEvent.TradeHandsAsync(ActionContainer.IndexPlayer);
        }
        public async Task DirectionAsync()
        {
            await BasicActionLogic.ShowMainScreenAgainAsync();

            await FluxxEvent.DirectionChosenAsync(ActionContainer.IndexDirection);
        }
        public async Task SelectCardAsync()
        {
            await BasicActionLogic.ShowMainScreenAgainAsync();

            await FluxxEvent.DoAgainSelectedAsync(ActionContainer.IndexCard);
        }