private void IncreasePrecipitationFrequency() { switch (precipitationFrequency) { case PrecipitationFrequency.Drought: precipitationFrequency = PrecipitationFrequency.Rare; break; case PrecipitationFrequency.Rare: precipitationFrequency = PrecipitationFrequency.Intermittent; break; case PrecipitationFrequency.Intermittent: precipitationFrequency = PrecipitationFrequency.Common; break; case PrecipitationFrequency.Common: precipitationFrequency = PrecipitationFrequency.Constant; break; case PrecipitationFrequency.Constant: break; default: break; } }
public Weather() { climate = Climate.Temperate; elevation = Elevation.SeaLevel; season = Season.Spring; precipitationIntensity = PrecipitationIntensity.Heavy; precipitationFrequency = PrecipitationFrequency.Intermittent; precipitationForm = PrecipitationForm.RainHeavy; cloudCover = CloudCover.CloudsMedium; windStrength = WindStrength.Light; windCheckSize = CharacterSize.None; windBlownAwaySize = CharacterSize.None; severeWeatherEvent = SevereWeatherEvent.None; inDesert = false; isDay = true; nightTempDrop = 0; RecalculateAll(true); }
private void SetPrecipitationAdjustments() { switch (climate) { case Climate.Cold: DecreasePrecipitationFrequency(); DecreasePrecipitationIntensity(); break; case Climate.Temperate: break; case Climate.Tropical: IncreasePrecipitationFrequency(); IncreasePrecipitationIntensity(); break; default: break; } switch (elevation) { case Elevation.SeaLevel: break; case Elevation.LowLands: break; case Elevation.Highlands: DecreasePrecipitationFrequency(); break; default: break; } if (inDesert) { precipitationFrequency = PrecipitationFrequency.Drought; } switch (precipitationFrequency) { case PrecipitationFrequency.Drought: DecreasePrecipitationIntensity(); DecreasePrecipitationIntensity(); break; case PrecipitationFrequency.Rare: break; case PrecipitationFrequency.Intermittent: break; case PrecipitationFrequency.Common: break; case PrecipitationFrequency.Constant: break; default: break; } }
private void SetSeasonalBaseline() { switch (season) { case Season.Spring: switch (climate) { case Climate.Cold: precipitationFrequency = PrecipitationFrequency.Intermittent; break; case Climate.Temperate: precipitationFrequency = PrecipitationFrequency.Intermittent; break; case Climate.Tropical: precipitationFrequency = PrecipitationFrequency.Common; break; default: break; } break; case Season.Summer: switch (climate) { case Climate.Cold: precipitationFrequency = PrecipitationFrequency.Common; break; case Climate.Temperate: precipitationFrequency = PrecipitationFrequency.Common; break; case Climate.Tropical: precipitationFrequency = PrecipitationFrequency.Intermittent; break; default: break; } break; case Season.Fall: switch (climate) { case Climate.Cold: precipitationFrequency = PrecipitationFrequency.Intermittent; break; case Climate.Temperate: precipitationFrequency = PrecipitationFrequency.Intermittent; break; case Climate.Tropical: precipitationFrequency = PrecipitationFrequency.Common; break; default: break; } break; case Season.Winter: switch (climate) { case Climate.Cold: precipitationFrequency = PrecipitationFrequency.Rare; break; case Climate.Temperate: precipitationFrequency = PrecipitationFrequency.Rare; break; case Climate.Tropical: precipitationFrequency = PrecipitationFrequency.Rare; break; default: break; } break; default: break; } }