Beispiel #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();
        }
Beispiel #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);
        }
Beispiel #3
0
 //length of deck
 public int length()
 {
     return(cards.Count());
 }
Beispiel #4
0
 // will add a card to the players hand
 public void CardToHand(Card card)
 {
     playerCard.Add(card);
     cardsRemaining = playerCard.Count();
 }
Beispiel #5
0
 //adding the card to center
 public void CardToCenter(Card card)
 {
     gameCenter.Add(card);
     centerCardsRemaning = gameCenter.Count();
 }