Exemplo n.º 1
0
 private void RedrawDeck(int deckNumber)
 {
     if (deckNumber == 1)
     {
         deck1.Items.Clear();
         foreach (string cardName in deckNo1.GetCardNames())
         {
             deck1.Items.Add(cardName);
         }
         label1.Text = "Deck #1 (" + deckNo1.Count + " cards)";
     }
     else if (deckNumber == 2)
     {
         deck2.Items.Clear();
         foreach (string cardName in deckNo2.GetCardNames())
         {
             deck2.Items.Add(cardName);
         }
         label2.Text = "Deck #2 (" + deckNo2.Count + " cards)";
     }
 }
Exemplo n.º 2
0
 private void RedrawDeck(int deckNumber)
 {
     if (deckNumber == 1)
     {
         lstDeck1.Items.Clear();
         foreach (string cardName in _deck1.GetCardNames())
         {
             lstDeck1.Items.Add(cardName);
         }
         lblDeck1.Text = $"Baralho 1 ({_deck1.Count} cartas)";
     }
     else
     {
         lstDeck2.Items.Clear();
         foreach (string cardName in _deck2.GetCardNames())
         {
             lstDeck2.Items.Add(cardName);
         }
         lblDeck2.Text = $"Baralho 1 ({_deck2.Count} cartas)";
     }
 }