public void Initialize()
 {
     deck        = CardUtility.Shuffle(GameController.instance.testDeck);
     discardPile = new List <Card>();
     hand        = new List <Card>();
     cardManager = new CardManager(deck, discardPile, hand, startingHandSize);
     UpdateAllDisplay();
 }
    public void Initialize()
    {
        List <Card> temp = new List <Card>();

        temp.AddRange(GameController.instance.testSupply);
        temp.AddRange(GameController.instance.testSupply);
        temp.AddRange(GameController.instance.testSupply);
        temp.AddRange(GameController.instance.testSupply);
        temp.AddRange(GameController.instance.testSupply);
        deck        = CardUtility.Shuffle(temp);
        discardPile = new List <Card>();
        hand        = new List <Card>();
        cardManager = new CardManager(deck, discardPile, hand, startingHandSize);
    }
Esempio n. 3
0
 ///<summary>
 ///Draws a card from deck to hand
 ///</summary>
 public void DrawCard()
 {
     // if deck has at least one card, draw it
     if (deck.Count >= 1)
     {
         UnsafeDrawCard();
     }
     else if (discardPile.Count >= 1)
     {
         // if discardPile has at least one card, shuffle discard into deck then draw
         deck.AddRange(CardUtility.Shuffle(discardPile));
         discardPile.RemoveAll((c) => true);
         UnsafeDrawCard();
     }
 }