Exemplo n.º 1
0
        public static DeckRegularDict <FluxxCardInformation> DiscardKeepers(FluxxGameContainer gameContainer, int howMany)
        {
            if (howMany <= 0)
            {
                throw new BasicBlankException("Must discard at least one keeper");
            }
            var firsts = gameContainer.SingleInfo !.KeeperList.GetRandomList(false, howMany);

            return(new DeckRegularDict <FluxxCardInformation>(firsts));
        }
Exemplo n.º 2
0
        public static Tuple <KeeperPlayer, KeeperPlayer> ExchangeKeepers(FluxxGameContainer gameContainer)
        {
            KeeperPlayer keeperFrom;

            keeperFrom = new KeeperPlayer()
            {
                Player = gameContainer.WhoTurn, Card = (int)gameContainer.SingleInfo !.KeeperList.GetRandomItem().Deck
            };
            var          tempList   = gameContainer.PlayerList !.AllPlayersExceptForCurrent();
            var          tempPlayer = tempList.GetRandomItem();
            KeeperPlayer KeeperTo   = new KeeperPlayer()
            {
                Player = tempPlayer.Id, Card = (int)tempPlayer.KeeperList.GetRandomItem().Deck
            };

            return(new Tuple <KeeperPlayer, KeeperPlayer>(keeperFrom, KeeperTo));
        }
Exemplo n.º 3
0
 public async Task DiscardKeeperAsync(FluxxCardInformation thisCard)
 {
     _gameContainer.SingleInfo !.KeeperList.RemoveObjectByDeck(thisCard.Deck);
     await _gameContainer.AnimatePlayAsync !(thisCard);
 }