Пример #1
0
        private IPile GetPileByExpedition(Card card, List <IPile> piles)
        {
            foreach (Pile p in piles)
            {
                if (p.Cards.Where(c => c.ExpeditionType.Code == card.ExpeditionType.Code).Any())
                {
                    return(p);
                }
            }

            IPile pile = new Pile();

            piles.Add(pile);
            return(pile);
        }
Пример #2
0
        public Game(List <Card> deck)
        {
            List <Card> hand = deck.GetRange(0, 8);

            PlayerCards = new Pile(hand);
            deck.RemoveRange(0, 8);

            hand     = deck.GetRange(0, 8);
            BotCards = new Pile(hand);
            deck.RemoveRange(0, 8);

            DrawPile          = new Pile(deck);
            PlayerExpeditions = new List <IPile>();
            BotExpeditions    = new List <IPile>();
            DiscardPiles      = new List <IPile>();

            DescriptionLastTurn = "Game initialization completed succesfully.";
        }