public override string ToString()
        {
            string result = "";

            result += "Weather State " + lastUpdate.ToString() + ":\n ";
            result += "Clouds " + currentState.GetClouds() + "\n";
            result += "Rain " + currentState.GetRain() + "\n";
            result += "Lightning " + currentState.GetLightning() + "\n";
            result += "Snow " + currentState.GetSnow() + "\n";
            return(result);
        }
        // accumulative values are asumed to be not null and correct for the season
        private WeatherState getNextState(WeatherState currentState)
        {
            int clouds, rain, snow, lightning;

            clouds = rain = snow = lightning = 0;


            //CLOUD VALUE:
            float random = UnityEngine.Random.value;

            for (int i = 0; i <= maxIntensityValue; i++)
            {
                if (random < cloudAcumulativeValues[currentState.GetClouds(), i])
                {
                    clouds = i;
                    break;
                }
            }
            if (debug)
            {
                Debug.Log("CALCULATING CLOUD VALUE: ");
                Debug.Log("Acumulative values: " + matrixToString(cloudAcumulativeValues));
                Debug.Log("Random value: " + random + ", \t Selected value:" + clouds);
            }

            //RAIN VALUE
            random = UnityEngine.Random.value;
            for (int i = 0; i <= maxIntensityValue; i++)
            {
                if (random < rainAcumulativeValues[currentState.GetClouds(), i])
                {
                    rain = i;
                    break;
                }
            }

            //SNOW VALUE
            random = UnityEngine.Random.value;
            for (int i = 0; i <= maxIntensityValue; i++)
            {
                if (random < snowAcumulativeValues[currentState.GetClouds(), i])
                {
                    snow = i;
                    break;
                }
            }

            //LIGHTNING VALUE
            random = UnityEngine.Random.value;
            for (int i = 0; i <= maxIntensityValue; i++)
            {
                if (random < lightningAcumulativeValues[currentState.GetClouds(), i])
                {
                    lightning = i;
                    break;
                }
            }

            //COHERENCY TEST
            if (rain > 0 && snow > 0)
            {
                if (biome.GetCloudProbability(rain, currentSeasonIndex) > biome.GetCloudProbability(snow, currentSeasonIndex))
                {
                    snow = 0;
                    if (debug)
                    {
                        Debug.Log("WEATHERCONTROLLER: rain found to be more likely than snow, therefore snow has been set to 0 ");
                        Debug.Break();
                    }
                }
                else
                {
                    rain = 0;
                    if (debug)
                    {
                        Debug.Log("WEATHERCONTROLLER: snow found to be more likely than rain, therefore rain has been set to 0 ");
                        Debug.Break();
                    }
                }
            }

            if (snow > clouds)
            {
                snow = clouds;
                if (debug)
                {
                    Debug.Log("WEATHERCONTROLLER: snow value was greater then the cloud intensity. The snow value has been changed to: " + snow);
                    Debug.Break();
                }
            }
            if (rain > clouds)
            {
                rain = clouds;
                if (debug)
                {
                    Debug.Log("WEATHERCONTROLLER: rain value was greater then the cloud intensity. The rain value has been changed to: " + rain);
                    Debug.Break();
                }
            }
            if (lightning >= clouds)
            {
                lightning = clouds;
                if (debug)
                {
                    Debug.Log("WEATHERCONTROLLER: lightning value was greater then the cloud and rain intensities. The lighning value has been changed to: " + lightning);
                    Debug.Break();
                }
            }

            return(new WeatherState(clouds, rain, lightning, snow));
        }