//constructors public Dwarf Generate(Random rand, int numberOfPhysical, int numberOfMental, int numberOfMagical = 0) { PersonLogic personLogic = new PersonLogic(); //Person person = Dwarf dwarfPerson = (Dwarf)personLogic.Generate("dwarf", rand, new Dwarf());; dwarfPerson.RaceType = "dwarf"; int index; //set name dwarfPerson.Name = GenerateName(dwarfPerson.Gender, rand); //reset age dwarfPerson.Age = rand.Next(1, MAXAGE); //reset position dwarfPerson.LengthOfRoleOccupancy = rand.Next(1, dwarfPerson.Age); //set DwarfFamily index = rand.Next(0, DwarfGroupOptions.Length); dwarfPerson.DwarfGroup = DwarfGroupOptions[index]; AddDwarf(dwarfPerson); personLogic.GenerateAdventures(dwarfPerson.PersonID, rand.Next(1, 10), rand); return(dwarfPerson); }
public Human Generate(Random rand, int numberOfPhysical, int numberOfMental, int numberOfMagical = 0) { PersonLogic personLogic = new PersonLogic(); Human human = (Human)personLogic.Generate("men", rand, new Human()); human.RaceType = "men"; int index; //set name human.Name = GenerateName(human.Gender, rand); //reset age human.Age = rand.Next(1, MAXAGE); //set Position human.LengthOfRoleOccupancy = rand.Next(1, human.Age); //set ancestral line index = rand.Next(0, AncestralLineOptions.Length); human.AncestralLine = AncestralLineOptions[index]; AddHuman(human); personLogic.GenerateAdventures(human.PersonID, rand.Next(1, 10), rand); return(human); }
public Wizard Generate(Random rand, int numberOfPhysical, int numberOfMagic, int numberOfMental) { PersonLogic personLogic = new PersonLogic(); Wizard wizard = (Wizard)personLogic.Generate("wizard", rand, new Wizard()); wizard.RaceType = "wizard"; int index; //set wizard color index = rand.Next(0, WizardColors.Length); wizard.WizardColor = WizardColors[index]; //set Name wizard.Name = GenerateName(wizard.Gender, rand, wizard.WizardColor); //Generate Magic Type index = rand.Next(0, MagicTypeOptions.Length); wizard.MagicType = MagicTypeOptions[index]; AddWizard(wizard); personLogic.GenerateAdventures(wizard.PersonID, rand.Next(1, 10), rand); return(wizard); }
//constructors public Hobbit Generate(Random rand, int numberOfAbilities, int numberOfMagical = 0, int numberOfMental = 0) { PersonLogic personLogic = new PersonLogic(); Hobbit hobbit = (Hobbit)personLogic.Generate("hobbit", rand, new Hobbit()); hobbit.RaceType = "Hobbit"; int index; //set Name hobbit.Name = GenerateName(hobbit.Gender, rand); //reset age hobbit.Age = rand.Next(1, MAXAGE); //reset position hobbit.LengthOfRoleOccupancy = rand.Next(1, hobbit.Age); //set Home type index = rand.Next(0, HomeTypeOptions.Length); hobbit.HomeType = HomeTypeOptions[index]; //set Booleans hobbit.OwnsOneRing = rand.Next(2) == 1; hobbit.IsAdventurer = rand.Next(2) == 1; AddHobbit(hobbit); personLogic.GenerateAdventures(hobbit.PersonID, rand.Next(1, 10), rand); return(hobbit); }
//constructors public Elf Generate(Random rand, int numberOfPhysical, int numberOfMental, int numberOfMagical) { PersonLogic personLogic = new PersonLogic(); Elf elfPerson = (Elf)personLogic.Generate("elf", rand, new Elf()); elfPerson.RaceType = "elf"; int index; //set Elf elfPerson.Name = GenerateName(elfPerson.Gender, rand); //set Elf Type index = rand.Next(0, ElfTypeOptions.Length); elfPerson.ElfType = ElfTypeOptions[index]; //set owns ring of power elfPerson.OwnsRingOfPower = rand.Next(2) == 1; AddElf(elfPerson); personLogic.GenerateAdventures(elfPerson.PersonID, rand.Next(1, 10), rand); return(elfPerson); }