package main import ( "fmt" "math/rand" "time" ) func randStr(s []string) string { return s[rand.Intn(len(s))] } func airQuality() string { return randStr([]string{ "moist", "warm", "humid", "cool", "dry", "electric", "dusty", "hazy", "smoky", "clear", }) } func wallType() string { return randStr([]string{ "bronze", "mossy stone", "wet stone", "copper", "tile", "hard wood", "stained wood", "purple", "light blue", "yellowed", "vine choked", "art hung", }) } func lightQuality() string { return randStr([]string{ "dimly lit", "brightly lit", "faintly lit", "covered in dancing shadows", "dappled", }) } func lightSource() string { return randStr([]string{ "candle light", "bioluminescent moss", "bioluminescent fungus", "lantern light", "flickering monitors", "a cracked LCD", "a fireplace", "a torch", "sconces", }) } func aroma() string { return randStr([]string{ "lavender", "cloves", "sulphur", "baking cookies", "dirt", "wet soil", "cut grass", "wet dog", "cinnamon", "swamp", "moss", }) } func main() { rand.Seed(time.Now().UTC().UnixNano()) fmt.Printf("the air is %s. %s walls are %s by %s. it smells faintly of %s.\n", airQuality(), wallType(), lightQuality(), lightSource(), aroma()) }