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