weed-sim / name_generator.py
tostido's picture
WEED-SIM: evolutionary genetics sandbox with embedded Observer Bus
ae853c1
Raw
History Blame Contribute Delete
1.29 kB
import random
class NameGenerator:
def __init__(self):
self.prefixes = {
"Indica": [
"Frost", "Iron", "Shadow", "Glacier", "Stone",
"Night", "Crystal", "Dark", "Ash", "Obsidian"
],
"Sativa": [
"Solar", "Flare", "Blaze", "Sky", "Thunder",
"Fire", "Sun", "Lightning", "Nova", "Volt"
],
"Hybrid": [
"Velvet", "Crimson", "Ghost", "Nebula", "Silver", "Phantom", "Storm", "Echo", "Twilight", "Lunar",
"Myco", "Drift", "Shade", "Plasma", "Oblivion", "Mist", "Hollow", "Nova", "Wisp", "Onyx",
"Zephyr", "Glow", "Pulse", "Eclipse", "Spore", "Dust", "Sable", "Prism", "Wraith", "Ashen",
"Flicker", "Thorn", "Rune", "Haze", "Tide", "Shiver", "Grime", "Rift", "Quartz", "Solstice"
]
}
self.middles = [
"leaf", "bloom", "root", "spark", "shade",
"flare", "dusk", "shard", "pulse", "drift"
]
def generate(self, traits):
plant_type = traits.get("Type", "Hybrid")
prefix = random.choice(self.prefixes.get(plant_type, self.prefixes["Hybrid"]))
middle = random.choice(self.middles)
return prefix + middle