private void SetUpSweden(int level) { if (level == 0 || level == 1) { CreateFearDeck(); SetUpFearCards(3, 3, 3); } else if (level == 2) { CreateFearDeck(10); SetUpFearCards(3, 4, 3); } else if (level == 3) { CreateFearDeck(10); SetUpFearCards(3, 4, 3); } else if (level == 4) { CreateFearDeck(11); SetUpFearCards(3, 4, 4); } else if (level == 5) { CreateFearDeck(12); SetUpFearCards(4, 4, 4); } else if (level == 6) { CreateFearDeck(13); SetUpFearCards(4, 4, 5); } if (level >= 4) { InvaderBox.Add(InvaderDeck[0]); InvaderDeck.RemoveAt(0); } }
private void CreateInvaderDeck() { InvaderBox.Clear(); InvaderDeck.Clear(); // construct and initialize all Invader cards by Phase for (int i = 1; i <= 4; i++) { String backPath = "assets/cards/invader/cards-invader-00.png"; ImageSource back = new BitmapImage(new Uri(backPath, UriKind.Relative)); String s = "0" + i.ToString(); String frontPath = "assets/cards/invader/cards-invader-" + s + ".png"; ImageSource front = new BitmapImage(new Uri(frontPath, UriKind.Relative)); InvaderCard ic = new InvaderCard(i, 1, front, back); InvaderDeck.Add(ic); } InvaderDeck.Shuffle(); InvaderBox.Add(InvaderDeck[0]); InvaderDeck.RemoveAt(0); ObservableCollection <InvaderCard> phase2 = new ObservableCollection <InvaderCard>(); for (int i = 6; i <= 10; i++) { String backPath = "assets/cards/invader/cards-invader-05.png"; ImageSource back = new BitmapImage(new Uri(backPath, UriKind.Relative)); String s = ""; if (i < 10) { s = "0" + i.ToString(); } else { s = i.ToString(); } String frontPath = "assets/cards/invader/cards-invader-" + s + ".png"; ImageSource front = new BitmapImage(new Uri(frontPath, UriKind.Relative)); InvaderCard ic = new InvaderCard(i, 2, front, back); phase2.Add(ic); } phase2.Shuffle(); InvaderBox.Add(phase2[0]); phase2.RemoveAt(0); foreach (InvaderCard c in phase2) { InvaderDeck.Add(c); } ObservableCollection <InvaderCard> phase3 = new ObservableCollection <InvaderCard>(); for (int i = 12; i <= 17; i++) { String backPath = "assets/cards/invader/cards-invader-11.png"; ImageSource back = new BitmapImage(new Uri(backPath, UriKind.Relative)); String s = i.ToString(); String frontPath = "assets/cards/invader/cards-invader-" + s + ".png"; ImageSource front = new BitmapImage(new Uri(frontPath, UriKind.Relative)); InvaderCard ic = new InvaderCard(i, 3, front, back); phase3.Add(ic); } phase3.Shuffle(); InvaderBox.Add(phase3[0]); phase3.RemoveAt(0); foreach (InvaderCard c in phase3) { InvaderDeck.Add(c); } }
private void SetUpBrandenburgPrussia(int level) { if (level == 0 || level == 1 || level == 2) { CreateFearDeck(); SetUpFearCards(3, 3, 3); } if (level == 2) { InvaderDeck.Move(InvaderDeck.Count - 1, 3); } else if (level == 3) { CreateFearDeck(10); SetUpFearCards(3, 4, 3); InvaderDeck.Move(InvaderDeck.Count - 1, 3); InvaderBox.Add(InvaderDeck[0]); InvaderDeck.RemoveAt(0); } else if (level == 4) { CreateFearDeck(11); SetUpFearCards(4, 4, 3); InvaderDeck.Move(InvaderDeck.Count - 1, 3); InvaderBox.Add(InvaderDeck[0]); InvaderDeck.RemoveAt(0); InvaderBox.Add(InvaderDeck[3]); InvaderDeck.RemoveAt(3); } else if (level == 5) { CreateFearDeck(11); SetUpFearCards(4, 4, 3); InvaderDeck.Move(InvaderDeck.Count - 1, 3); InvaderBox.Add(InvaderDeck[0]); InvaderDeck.RemoveAt(0); InvaderBox.Add(InvaderDeck[3]); InvaderDeck.RemoveAt(3); InvaderBox.Add(InvaderDeck[0]); InvaderDeck.RemoveAt(0); } else if (level == 6) { CreateFearDeck(12); SetUpFearCards(4, 4, 4); InvaderDeck.Move(InvaderDeck.Count - 1, 3); InvaderBox.Add(InvaderDeck[0]); InvaderDeck.RemoveAt(0); InvaderBox.Add(InvaderDeck[3]); InvaderDeck.RemoveAt(3); InvaderBox.Add(InvaderDeck[0]); InvaderDeck.RemoveAt(0); InvaderBox.Add(InvaderDeck[0]); InvaderDeck.RemoveAt(0); } }