public static Character createRandomCharacter() { /** * We want to setup these values in a very particular sequence. * i.e. What is said in life events depends on age. * i.e. A character's name depends on their gender. * etc. etc. */ Age age = Age.ReturnRandomAge(); Mother mother = Mother.ReturnMother(); Father father = Father.ReturnFather(); Parents parents = Parents.ReturnRandomParentsComment(); Appearance appearance = Appearance.ReturnRandomAppearanceComment(); Race race = Race.ReturnRandomRace(); LifeEvents lifeEvents = LifeEvents.ReturnRandomLifeEventsComment(); Childhood childhood = Childhood.ReturnRandomChildhoodEvent(); Adolescence adolescence = Adolescence.ReturnRandomAdolescenceEvent(); Adulthood adulthood = Adulthood.ReturnRandomAdulthoodEvent(); OldAge elder = OldAge.ReturnRandomElderlyEvent(); Profession profession = Profession.ReturnRandomProfession(); RelationshipStatus relationshipStatus = RelationshipStatus.ReturnRandomRelationshipStatus(); Stats stats = Stats.GenerateRandomStats(); Role role = Role.ReturnRandomRole(); Demeanor demeanor = Demeanor.ReturnRandomDemeanor(); Gender gender = Gender.ReturnRandomGender(); CharacterName characterName = CharacterName.ReturnRandomCharacterName(gender); PlaceOfResidence placeOfResidence = PlaceOfResidence.ReturnRandomPlaceOfResidence(); NullChatMenuComponent nullChatMenuComponent = new NullChatMenuComponent(""); Character randomCharacter; randomCharacter = new Character(characterName, age, parents, mother, father, appearance, race, lifeEvents, childhood, adolescence, adulthood, elder, profession, relationshipStatus, stats, role, demeanor, gender, placeOfResidence, nullChatMenuComponent); return(randomCharacter); }
public static OldAge ReturnRandomElderlyEvent() { List <string> oldageEventsList = new List <string>(); oldageEventsList.Add("I fell in love."); oldageEventsList.Add("I became very sick."); oldageEventsList.Add("I joined the resistance."); oldageEventsList.Add("I liberated a group of mutant slaves."); oldageEventsList.Add("I found myself homeless."); oldageEventsList.Add("I found myself employed by a very generous corporation."); OldAge randomOldAgeEvent = new OldAge(oldageEventsList[Random.Range(0, oldageEventsList.Count)]); return(randomOldAgeEvent); }
protected override void OnNavigatedTo(NavigationEventArgs e) { try { job = new Job(); jobModel = new JobViewModel(); job = jobModel.getJobs(); oldAge = new OldAge(); oldModel = new OldAgeViewModel(); oldAge = oldModel.getOldAges(); orphanage = new Orphanage(); orphanageModel = new OrphanageViewModel(); orphanage = orphanageModel.getOrphanages(); if (job == null) { //populate jobs table if empty jobModel.addJobManually("TUT Jobs", "http://www.tut.ac.za"); jobModel.addJobManually("Carees 24", "http://www.carees24.com"); jobModel.addJobManually("Goverment Jobs", "http://www.goverment.ac.za"); jobModel.addJobManually("Indeed Jobs", "http://www.indeed.com"); } //now populate old ages table if empty if (oldAge != null) { oldModel.addOldAgeManually("Overall Search", "https://www.google.co.za/?gfe_rd=cr&ei=M13pVZSSGYKp8weova_IDw&gws_rd=ssl#q=oldAge"); oldModel.addOldAgeManually("Vermount Old Age", "http://community-services.blaauwberg.net/old-age-homes/old-age-homes-western-cape/Vermont-Old-Aged-Home-Hornlee"); oldModel.addOldAgeManually("SeniorServices Old Age", "https://www.google.co.za/?gfe_rd=cr&ei=M13pVZSSGYKp8weova_IDw&gws_rd=ssl#q=seniorservice"); oldModel.addOldAgeManually("Mothwa Haven Old Age", "http://www.yellowpages.co.za/business/SA_5878392_BUS"); } //now populate orphanages table if empty if (orphanage != null) { orphanageModel.addOphenagebManually("Tshwaraganang", "http://www.tshwaraganang.org.za/index.php/component/content/?view=featured"); orphanageModel.addOphenagebManually("Arcadia Home", "http://www.jhbchev.co.za/pages/default.aspx"); orphanageModel.addOphenagebManually("Sunnyside Orphanage Home", "http://www.soh.org.za/"); orphanageModel.addOphenagebManually("Overall Search", "https://www.google.co.za/?gfe_rd=cr&ei=M13pVZSSGYKp8weova_IDw&gws_rd=ssl#q=orphanage+"); } } catch (Exception ex) { } base.OnNavigatedTo(e); }
protected override void OnNavigatedTo(NavigationEventArgs e) { try { job = new Job(); jobModel = new JobViewModel(); job = jobModel.getJobs(); oldAge = new OldAge(); oldModel = new OldAgeViewModel(); oldAge = oldModel.getOldAges(); orphanage = new Orphanage(); orphanageModel = new OrphanageViewModel(); orphanage = orphanageModel.getOrphanages(); if (job == null) { //populate jobs table if empty jobModel.addJobManually("TUT Jobs", "http://www.tut.ac.za"); jobModel.addJobManually("Carees 24", "http://www.carees24.com"); jobModel.addJobManually("Goverment Jobs", "http://www.goverment.ac.za"); jobModel.addJobManually("Indeed Jobs", "http://www.indeed.com"); } //now populate old ages table if empty if (oldAge == null) { oldModel.addOldAgeManually("Vermount Old Age", "http://www.vermount.ac.za"); oldModel.addOldAgeManually("Vermount Old Age", "http://www.vermount.ac.za"); oldModel.addOldAgeManually("Vermount Old Age", "http://www.vermount.ac.za"); } //now populate orphanages table if empty if (orphanage == null) { orphanageModel.addOphenagebManually("Thabang Lebese"); orphanageModel.addOphenagebManually("Thabang Lebese"); orphanageModel.addOphenagebManually("Thabang Lebese"); } } catch (Exception ex) { } base.OnNavigatedTo(e); }
public Character(CharacterName characterName, Age age, Parents parents, Mother mother, Father father, Appearance appearance, Race race, LifeEvents lifeEvents, Childhood childhood, Adolescence adolescence, Adulthood adulthood, OldAge elder, Profession profession, RelationshipStatus relationshipStatus, Stats stats, Role role, Demeanor demeanor, Gender gender, PlaceOfResidence placeOfResidence, NullChatMenuComponent nullChatMenuComponent) { this.characterName = characterName; this.age = age; this.parents = parents; this.mother = mother; this.father = father; this.appearance = appearance; this.race = race; this.lifeEvents = lifeEvents; this.childhood = childhood; this.adolescence = adolescence; this.adulthood = adulthood; this.elder = elder; this.profession = profession; this.relationshipStatus = relationshipStatus; this.stats = stats; this.role = role; this.demeanor = demeanor; this.gender = gender; this.placeOfResidence = placeOfResidence; this.nullChatMenuComponent = nullChatMenuComponent; }