Пример #1
0
        public void MakeCustomers(Weather weather, Recipe recipe, Player player)
        {
            Random rand = new Random();

            if (weather.currentWeather == "bad")
            {
                for (int i = 0; i < 50; i++)
                {
                    Customer customer = new Customer(rand);
                    customer.GenerateChancesOfBuying(weather, recipe, player, rand);
                    customersPerDay.Add(customer);
                }
            }
            else if (weather.currentWeather == "fair")
            {
                for (int i = 0; i < 75; i++)
                {
                    Customer customer = new Customer(rand);
                    customer.GenerateChancesOfBuying(weather, recipe, player, rand);
                    customersPerDay.Add(customer);
                }
            }
            else if (weather.currentWeather == "good")
            {
                for (int i = 0; i < 100; i++)
                {
                    Customer customer = new Customer(rand);
                    customer.GenerateChancesOfBuying(weather, recipe, player, rand);
                    customersPerDay.Add(customer);
                }
            }
        }