Esempio n. 1
0
        public Biome SelectBiome(Hex.TemperatureLevel temperature, Hex.HumidityLevel humidity)
        {
            var validBiomes = Biomes.Where(x => x.TemperatureRange.Contains(temperature) &&
                                           x.HumidityRange.Contains(humidity));

            if (validBiomes.Count() == 0)
            {
                return(null);
            }
            int i = _rand.GenerateInt(validBiomes.Count());

            return(validBiomes.ElementAt(i));
        }
Esempio n. 2
0
 public bool TemperatureAndHumidityValid(Hex.TemperatureLevel temperature, Hex.HumidityLevel humidity)
 {
     return(TemperatureRange.Contains(temperature) && HumidityRange.Contains(humidity));
 }
Esempio n. 3
0
 public void AddHumidity(Hex.HumidityLevel humidity)
 {
     HumidityRange.Add(humidity);
 }