예제 #1
0
        private void ContemplateSuitHint(Card.Suit suit, IEnumerable <Card> relevantCards)
        {
            var remainingCardsForSuit = Card.GetNumbers().Count() - game.Progress[suit];

            if (remainingCardsForSuit < relevantCards.Count())
            {
                foreach (var card in relevantCards)
                {
                    card.ShouldBurn = true;
                }
            }
            else if (relevantCards.Count() == 1)
            {
                relevantCards.First().ShouldGain = true;
            }
        }
예제 #2
0
        public Deck(IVersionSource versionSource)
        {
            VersionSource = versionSource;
            var cardList = new List <Card>();

            foreach (var suit in Card.GetSuits())
            {
                foreach (var number in Card.GetNumbers())
                {
                    for (var i = 0; i < cardCounts[number - 1]; i++)
                    {
                        cardList.Add(new Card(suit, number, versionSource));
                    }
                }
            }
            cards = cardList.ToArray();
            Shuffle(cards);
        }