/// <summary> /// Adds a card to Picks /// </summary> /// <param name="card">Card to add</param> public void Add(Card card) { if (card == null) throw new ArgumentNullException("Card card was null"); m_picks.Add(card); if (card.SuperType == SuperType.Creature || card.SuperType == SuperType.ArtifactCreature) m_creatures++; }
/// <summary> /// Initiates the new draft and opens the first booster pack /// </summary> private void NewGame() { comboSets.Enabled = false; buttonAddSet.Enabled = false; buttonSave.Visible = false; buttonPick.Visible = true; AIColors = new List<CardColor[]>(); picks = new Dictionary<ListViewItem, Card>(); packs = new List<Dictionary<ListViewItem, Card>>(); packRefs = new List<List<ListViewItem>>(); draftedCards = new List<Picks>(); selected = null; boosters = -1; for (int i = 0; i < 8; i++) draftedCards.Add(new Picks()); foreach (ListViewItem item in listViewPicked.Items) listViewPicked.Items.Remove(item); NextBooster(); }
/// <summary> /// Changes the card image whenever you choose a different item /// </summary> private void listViewPicked_SelectedIndexChanged(object sender, EventArgs e) { try { selected = picks[listViewPicked.SelectedItems[0]]; cardImage.Image = selected.Picture; labelTips.Text = "TIPS: " + selected.Tip; } catch { } }