import random

from procgen.aspects import Aspect
from procgen.species.aspects.aspect_categories import AspectCategory


class WorldPreference(Aspect):
    def __init__(self, description):
        super().__init__(description=description, categories={AspectCategory.WORLD_PREFERENCE})

arid = WorldPreference('arid')
rocky = WorldPreference('rocky')
desert = WorldPreference('desert')
tropical = WorldPreference('tropical')
oceanic = WorldPreference('oceanic')
continental = WorldPreference('continental')
alpine = WorldPreference('alpine')
tundra = WorldPreference('tundra')
arctic = WorldPreference('arctic')
savannah = WorldPreference('savannah')
plains = WorldPreference('plains')
forest = WorldPreference('forest')

world_preferences = [
    arid,
    rocky,
    desert,
    tropical,
    oceanic,
    continental,
    alpine,
    tundra,
    arctic,
    savannah
]


def get_world_preference():
    return random.choice(world_preferences)
