public void GenerateAdventures(int personID, int numberOfAdventures, Random rand) { AdventureLogic adventure = new AdventureLogic(); for (int i = 0; i < numberOfAdventures; i++) { adventure.Generate(rand.Next(1, 20), personID, rand); } }
private void newBtn_Click(object sender, EventArgs e) { PersonLogic personLogic = new PersonLogic(); LocationLogic locationLogic = new LocationLogic(); Random rand = new Random(); currentAdventure = adventureLogic.Generate(rand.Next(1, 20), personLogic.GetRandomID(rand), rand); currentAdventure.Person = personLogic.GetPerson(currentAdventure.MainPersonID); currentAdventure.Location = locationLogic.GetLocation(currentAdventure.WhereToLocationID); Display(); }