AI-Project/survival/game/biomes/biome_data.py

10 lines
344 B
Python
Raw Normal View History

from survival.game.biomes.biome_preset import BiomePreset
2021-05-10 12:56:08 +02:00
class BiomeData:
def __init__(self, preset: BiomePreset):
self.biome = preset
def get_diff_value(self, height: float, moisture: float, heat: float):
return (height - self.biome.min_height) + (moisture - self.biome.min_moisture) + (heat - self.biome.min_heat)