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)); }
public bool TemperatureAndHumidityValid(Hex.TemperatureLevel temperature, Hex.HumidityLevel humidity) { return(TemperatureRange.Contains(temperature) && HumidityRange.Contains(humidity)); }
public void AddHumidity(Hex.HumidityLevel humidity) { HumidityRange.Add(humidity); }