public CardList PickHand(Random inR, int num_cards) { int final_cards = mDeck.Cards.Count - num_cards; while (mDeck.Cards.Count > final_cards && mDeck.Cards.Count > 0) { int index = inR.Next(0, mDeck.Cards.Count); Entity temp = mDeck.Cards[index]; mDeck.RemoveCard(temp); mHand.AddCard(temp); } return(mHand); }
public void FinishMulligan() { foreach (Entity E in mMulliganedCards.Cards) { mDeck.AddCard(E); } mMulliganedCards.Cards.Clear(); mMulligansUsed = 0; }
public Entities.Entity MulliganCard(System.Random inR, Entity mulliganCard) { Entities.Entity newCard = null; if (mDeck.Cards.Any()) { mHand.RemoveCard(mulliganCard); mMulliganedCards.AddCard(mulliganCard); newCard = mDeck.Cards[inR.Next(0, mDeck.Cards.Count)]; mDeck.RemoveCard(newCard); mHand.AddCard(newCard); mMulligansUsed++; } return(newCard); }