Exemplo n.º 1
0
        //Random rnd;

        //constructor


        //member methods
        public void BuysLemonade(Forecast forecast, Random rnd)
        {
            int minimum = 1;
            int maximum = 100;

            Player player = new Player();
            Recipe recipe = new Recipe();

            if (recipe.lemonsPerPitcher >= 8)
            {
                maximum -= 10;
            }
            if (recipe.lemonsPerPitcher <= 4)
            {
                maximum -= 10;
            }
            if (recipe.honeyPerPitcher >= 11)
            {
                maximum -= 10;
            }
            if (recipe.honeyPerPitcher <= 6)
            {
                maximum -= 10;
            }
            if (recipe.cubesPerGlass <= 2)
            {
                maximum -= 10;
            }
            if (forecast.Precipiatation <= 2)
            {
                maximum -= 20;
            }
            if (forecast.Precipiatation == 3 || forecast.Precipiatation == 4)
            {
                maximum -= 10;
            }

            purchasingIdentifier = rnd.Next(minimum, maximum);
        }
Exemplo n.º 2
0
 public static Forecast DisplayPrecipitation(Forecast forecast)
 {
     forecast.GetPrecipitationStatus();
     Console.WriteLine(forecast);
     return(forecast);
 }
Exemplo n.º 3
0
 public static Forecast DisplayWeather(Forecast forecast)
 {
     forecast.GetTemperature();
     return(forecast);
 }