//draw a card of the disposalPile and remove it from the disposalPile public BasicCard DrawCardFromDisposalPile() { //si le deck est vide on reprend toute les cartes dans la disposal pile pour remplir le deck en mélangeant les cartes. if (disposalPile.Count() == 0) { Debug.Log("the disposalPile is empty"); } // Take from the deck BasicCard myNewCard = disposalPile.DrawCard(); hand.AddCard(myNewCard); return(myNewCard); }
// Moves the card from the disposal, randomly into the desk public void ShuffleDeck() { // The desck MUST be empty before to be shuffled with // the disposal pile :) if (playerDeck.Count() == 0) { while (disposalPile.Count() > 0) { playerDeck.AddCard(disposalPile.DrawCard()); } } }