Пример #1
0
        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);
            }
        }
Пример #2
0
        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();
        }