public Invasion(AdversaryCard adv, int advLevel = 0, int players = 1) : this(players) { MyAdversary = adv; MyAdversary.Level = advLevel; if (MyAdversary.Id == 0) { SetUpDefaultAdversary(); } else if (MyAdversary.Id == 1) { SetUpBrandenburgPrussia(advLevel); } else if (MyAdversary.Id == 2) { SetUpEngland(advLevel); } else if (MyAdversary.Id == 3) { SetUpFrance(advLevel); } else if (MyAdversary.Id == 4) { SetUpSweden(advLevel); } else { MessageBox.Show("Error"); } }
private void lbAdversaries_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) { if (lbAdversaries.SelectedIndex >= 0 && lbAdversaries.SelectedIndex < MyAdversaryList.Count) { SelectedAdversary = MyAdversaryList[lbAdversaries.SelectedIndex]; if (lbAdversaries.SelectedIndex == 0) { slAdversaryLevel.IsEnabled = false; } else { slAdversaryLevel.IsEnabled = true; } } }
private void CreateAdversaryDeck() { AdversaryDeck.Clear(); // Generic Difficulty Zero String frontPath = "assets/other/adversaries/adversary-brand-prussia-2.png"; ImageSource front = new BitmapImage(new Uri(frontPath, UriKind.Relative)); String backPath = "assets/other/adversaries/adversary-brand-prussia-2.png"; ImageSource back = new BitmapImage(new Uri(backPath, UriKind.Relative)); AdversaryCard a = new AdversaryCard(0, "Derp", 0, front, back); AdversaryDeck.Add(a); // Brandenburg Prussia frontPath = "assets/other/adversaries/adversary-brand-prussia-1.png"; front = new BitmapImage(new Uri(frontPath, UriKind.Relative)); backPath = "assets/other/adversaries/adversary-brand-prussia-2.png"; back = new BitmapImage(new Uri(backPath, UriKind.Relative)); a = new AdversaryCard(1, "Brandenburg-Prussia", 0, front, back); AdversaryDeck.Add(a); // England frontPath = "assets/other/adversaries/adversary-england-1.png"; front = new BitmapImage(new Uri(frontPath, UriKind.Relative)); backPath = "assets/other/adversaries/adversary-england-2.png"; back = new BitmapImage(new Uri(backPath, UriKind.Relative)); a = new AdversaryCard(2, "England", 0, front, back); AdversaryDeck.Add(a); // France frontPath = "assets/other/adversaries/adversary-france-1.png"; front = new BitmapImage(new Uri(frontPath, UriKind.Relative)); backPath = "assets/other/adversaries/adversary-france-2.png"; back = new BitmapImage(new Uri(backPath, UriKind.Relative)); a = new AdversaryCard(3, "France", 0, front, back); AdversaryDeck.Add(a); // Sweden frontPath = "assets/other/adversaries/adversary-sweden-1.png"; front = new BitmapImage(new Uri(frontPath, UriKind.Relative)); backPath = "assets/other/adversaries/adversary-sweden-2.png"; back = new BitmapImage(new Uri(backPath, UriKind.Relative)); a = new AdversaryCard(4, "Sweden", 0, front, back); AdversaryDeck.Add(a); }