예제 #1
0
        static void Main(string[] args)
        {
            Game game = new Game();
            RNG  rng  = new RNG();

            rng.GenerateRandomNumber(1, 101);
            game.RunGame();
        }
예제 #2
0
        public void GenerateCustomers(RNG Rnd)
        {
            int min = 40;
            int max = 100;

            if (weather.condition == "Sunny")
            {
                min += 10;
                max += 10;
            }

            else if (weather.condition == "Rainy")
            {
                min -= 10;
                max -= 10;
            }
            else if (weather.condition == "Toxic Smog (LOL)")
            {
                min -= 15;
                max -= 15;
            }
            else if (weather.condition == "Cloudy")
            {
                min -= 0;
                max -= 0;
            }
            else if (weather.condition == "Drought like")
            {
                min += 15;
                max += 15;
            }

            int numberOfCustomers = Rnd.GenerateRandomNumber(min, max);

            for (int i = 0; i < numberOfCustomers; i++)
            {
                customers.Add(new Customers(Rnd));
            }
        }
예제 #3
0
        //   ChanceBasedOnTemperature(weather);
        // ChanceBasedOnPrice();


        public Customers(RNG Rnd)
        {
            percentChanceToBuy = Rnd.GenerateRandomNumber(30, 61);
        }