Esempio n. 1
0
        //will add cards to players hand
        public void AddCardsToHand(CardList cards)
        {
            for (int i = 0; i < cards.Count(); i++)
            {
                playerCard.Add(cards[i]);
            }

            cardsRemaining = playerCard.Count();
        }
Esempio n. 2
0
        //toString displays players cards
        public String ToString(CardList cardsDrawn, int playerNumber)
        {
            String cardsDrawnString = "";

            cardsDrawnString += "\n\nDrawnCards Player " + playerNumber.ToString() + "\n";
            for (int i = 0; i < cardsDrawn.Count(); i++)
            {
                Card tempCard = cardsDrawn.GetCard(i, cardsDrawn);
                cardsDrawnString += tempCard.ToString();
                if (i != 51)
                {
                    cardsDrawnString += ", ";
                }
            }

            return(cardsDrawnString);
        }
Esempio n. 3
0
 //length of deck
 public int length()
 {
     return(cards.Count());
 }
Esempio n. 4
0
 // will add a card to the players hand
 public void CardToHand(Card card)
 {
     playerCard.Add(card);
     cardsRemaining = playerCard.Count();
 }
Esempio n. 5
0
 //adding the card to center
 public void CardToCenter(Card card)
 {
     gameCenter.Add(card);
     centerCardsRemaning = gameCenter.Count();
 }