public Card Draw() { if (cards.Count == 0) { return(null); } else { var card = cards[0]; cards.RemoveAt(0); return(card); } }
// Draws (deletes) a number of cards from the Deck public Card DrawCard() { Card drawnCard = null; if (Count() != 0) { drawnCard = cards[0]; cards.RemoveAt(0); if (Count() == 0) { drawnCard.LastCard = true; } } else { } return(drawnCard); }
// Draws (deletes) a number of cards from the Deck public Card DrawCard() { Card drawnCard = null; if (Count() != 0) { drawnCard = cards[0]; cards.RemoveAt(0); if (Count() == 0) { //drawnCard.LastCard = true; //for(int i = 0; i > cards.Count(); i++) //{ // cards[i] = cards[i + 1]; //} //cards.RemoveAt(cards.Count()); } } else { } return(drawnCard); }
public void RemoveAt(int index) { Cards.RemoveAt(index); }