Exemple #1
0
        public void DrawDisplayingCard(MyPlayer player)
        {
            int numberOfDisplayingCard = DisplayingCards.Count;

            if (numberOfDisplayingCard > 0)
            {
                Card card = DisplayingCards[numberOfDisplayingCard - 1];
                player.ReceiveDisplayingCard(card);
                AddCardAnimation(card, player.NextCardPosition());

                DisplayingCards.Remove(card);
            }
        }
Exemple #2
0
        public void DrawDisplayingCard(MyPlayer player, byte value)
        {
            int numberOfDisplayingCard = DisplayingCards.Count;

            if (numberOfDisplayingCard > 0)
            {
                Card card = DisplayingCards[numberOfDisplayingCard - 1];
                card.SetCardValue(value);
                card.SetFaceUp(true);
                player.ReceiveDisplayingCard(card);
                AddCardAnimation(card, player.NextCardPosition());

                DisplayingCards.Remove(card);
            }
        }
Exemple #3
0
        public void DealDisplayingCards(MyPlayer player, int numberOfCard)
        {
            int start  = DisplayingCards.Count - 1;
            int finish = DisplayingCards.Count - 1 - numberOfCard;

            List <Card> cardsToRemoveFromDeck = new List <Card>();

            for (int i = start; i > finish; i--)
            {
                Card card = DisplayingCards[i];
                player.ReceiveDisplayingCard(card);
                cardsToRemoveFromDeck.Add(card);
                AddCardAnimation(card, player.NextCardPosition());
            }

            foreach (Card card in cardsToRemoveFromDeck)
            {
                DisplayingCards.Remove(card);
            }
        }
Exemple #4
0
 public void DrawDroppedCard(MyPlayer player, Card card)
 {
     player.ReceiveDisplayingCard(card);
     AddCardAnimation(card, player.NextCardPosition());
 }