public Herd InitializeDinosaurs() { //Instantiate Attack Types string[] dinoAttacks = new string[3]; dinoAttacks[0] = "Bite"; dinoAttacks[1] = "Claw"; dinoAttacks[2] = "Kick"; activeAttacks = dinoAttacks; //Instantiates New Dinosaurs Dinosaur dinoOne = new Dinosaur("T-Rex", 5); Dinosaur dinoTwo = new Dinosaur("Raptor", 7); Dinosaur dinoThree = new Dinosaur("Brontosaurus", 5); //Instantiates Herd and adds Dinosaurs to Herd Herd herdOne = new Herd(); herdOne.AddDinosaurToHerd(dinoOne); herdOne.AddDinosaurToHerd(dinoTwo); herdOne.AddDinosaurToHerd(dinoThree); //Prints Summary of Herd and Lists each Dinosaur's attack Power Console.WriteLine("Herd Created! Meet the Dinosaurs:"); foreach (Dinosaur dinosaur in herdOne.dinosaurs) { Console.WriteLine($"Name: {dinosaur.dinosaurType}"); Console.WriteLine(); } return(herdOne); }
public void PopulateBattlefield() { fleet1.AddRobottoFleet(fleet1.CreateRobot("Smasher", 100, 100)); fleet1.AddRobottoFleet(fleet1.CreateRobot("Metal Mouth", 100, 100)); fleet1.AddRobottoFleet(fleet1.CreateRobot("Rusty Bicep", 100, 100)); herd1.AddDinosaurToHerd(herd1.CreateDinosaur("T-Rex", 100, 100, 20)); herd1.AddDinosaurToHerd(herd1.CreateDinosaur("Stegga", 100, 100, 20)); herd1.AddDinosaurToHerd(herd1.CreateDinosaur("Raptor", 100, 100, 20)); }