public MainWindow() { InitializeComponent(); ICharacter robert = new zMage("Robert", Riku); ICharacter nick = new zWarrior("Nick", Vexen); ICharacter bob = new zComputerWizard("Bob", Xenmas); ICharacter alice = new Archer("Alice", Flare); // Team lists IList <ICharacter> jocks = new List <ICharacter>(); IList <ICharacter> nerds = new List <ICharacter>(); jocks.Add(robert); jocks.Add(nick); nerds.Add(bob); nerds.Add(alice); // Set up combat logic StreamWriter output = new StreamWriter(console); Console.SetOut(output); Combat battle = new Combat(jocks, nerds, "Jocks", "Nerds"); CombatThread combatThread = new CombatThread(battle); combatThread.Start(); }
public MainWindow() { InitializeComponent(); TextWriter writer = new TextBoxStreamWriter(textbox); Console.SetOut(writer); IList <ICharacter> playerParty1 = new List <ICharacter>(); //Create Parties IList <ICharacter> playerParty2 = new List <ICharacter>(); string groupName1 = "Good_Guys"; //Give Parties names string groupName2 = "Bad_Guys"; playerParty1.Add(new MageView("Gandalf", 50, Player1Image)); //Add the good guys playerParty1.Add(new WarriorView("Boromir", 50, Player2Image)); playerParty2.Add(new ArcherView("Bow guy", 50, Player3Image)); //Add the bad guys playerParty2.Add(new ComputerWizardView("Machine Language", 50, Player4Image)); ICombat battle = new Combat(playerParty1, playerParty2, groupName1, groupName2); //Create Icombat for AutoBattle CombatThread fight = new CombatThread(battle); fight.Start(); }
public MainWindow() { InitializeComponent(); TextBoxStreamWriter consoleWriter = new TextBoxStreamWriter(textBox); Console.SetOut(consoleWriter); //Initalize variables IList <ICharacter> playerParty = new List <ICharacter>(); IList <ICharacter> enemyParty = new List <ICharacter>(); string playerPartyName = "Heroes"; string enemyPartyName = "Villains"; //Create player characters ICharacter player1 = new ImageMage("Harry Potter", 41, characterImage); ICharacter player2 = new ImageWarrior("Carl Sagan", 110, characterImage1); //Create enemy characters ICharacter enemy1 = new ImageArcher("Voldemort", 90, characterImage2); ICharacter enemy2 = new ImageComputerWizard("Neil deGrasse Tyson", 41, characterImage3); //Add players to party playerParty.Add(player1); playerParty.Add(player2); //Add enemys to party enemyParty.Add(enemy1); enemyParty.Add(enemy2); //Initalize combat encounter = new Combat(playerParty, enemyParty, playerPartyName, enemyPartyName); CombatThread combatThread = new CombatThread(encounter); combatThread.Start(); }
public MainWindow() { InitializeComponent(); consoleWriter = new TextBoxStreamWriter(TextBox); Console.SetOut(consoleWriter); ICharacter mage = new MageHero(mageImage); ICharacter warrior = new WarriorHero(warriorImage); ICharacter archer = new ArcherHero(archerImage); ICharacter computerWizard = new ComputerWizardHero(computerWizardImage); IList <ICharacter> friendlyParty = new List <ICharacter>(); IList <ICharacter> enemyParty = new List <ICharacter>(); friendlyParty.Add(warrior); enemyParty.Add(mage); enemyParty.Add(archer); enemyParty.Add(computerWizard); combat = new Combat(friendlyParty, enemyParty, "Good Guys", "Baddies"); combatThread = new CombatThread(combat); combatThread.Start(); }