Beispiel #1
0
        public TraditionalCard DealCardToHand(Hand destinationHand)
        {
            TraditionalCard firstCard = cards[0];

            firstCard.MoveToHand(destinationHand);
            return(firstCard);
        }
Beispiel #2
0
 internal void Add(TraditionalCard card)
 {
     cards.Add(card);
     if (ReceivedCard != null)
     {
         ReceivedCard(this, new CardEvents()
         {
             Card = card
         });
     }
 }
Beispiel #3
0
        public void Shuffle()
        {
            Random random = new Random();
            List <TraditionalCard> shuffleDeck = new List <TraditionalCard>();

            while (cards.Count > 0)
            {
                TraditionalCard card = cards[random.Next(0, cards.Count)];
                cards.Remove(card);
                shuffleDeck.Add(card);
            }

            cards = shuffleDeck;
        }
Beispiel #4
0
        internal TraditionalCard Remove(TraditionalCard card)
        {
            if (cards.Contains(card))
            {
                cards.Remove(card);

                if (LostCard != null)
                {
                    LostCard(this, new CardEvents()
                    {
                        Card = card
                    });
                }
                return(card);
            }
            return(null);
        }
Beispiel #5
0
 public AnimatedCardsGameComponent(TraditionalCard card, _21BlackJack.Cards_FrameWork.Game.CardsGame cardGame) : base(cardGame, null)
 {
     Card = card;
 }