use rand::prelude::*; use rand::{thread_rng}; const FIRSTS: [&'static str; 53] = [ "artificial", "ambient", "borean", "brewing", "bristling", "compressed", "ceramic", "chromatic", "concave", "convex", "distorted", "deserted", "emotive", "emotionless", "elliptical", "extrasolar", "fierce", "fossilised", "frozen", "gravitational", "jovian", "inverted", "leafy", "lurking", "limitless", "magnetic", "metallic", "mossy", "mighty", "modulated", "nocturnal", "noisy", "nutritious", "powerful", "obscure", "organic", "oxygenated", "oscillating", "ossified", "orbiting", "piscine", "polar", "pure", "recalcitrant", "rogue", "sealed", "subversive", "subterranean", "supercooled", "subsonic", "synthetic", "terrestrial", "weary", ]; const LASTS: [&'static str; 63] = [ "artifact", "assembly", "antenna", "alloy", "carrier", "carbon", "console", "construct", "coordinates", "craft", "core", "design", "drone", "distortion", "detector", "energy", "entropy", "exoplanet", "foilage", "forest", "form", "fossil", "frequency", "function", "fusion", "fission", "information", "insulator", "layout", "lifeform", "liquid", "landmass", "lens", "mass", "mantle", "magnetism", "mechanism", "mountain", "nectar", "nebula", "oxide", "orbit", "pattern", "plant", "planet", "poseidon", "problem", "receiver", "replicant", "river", "satellite", "scaffold", "structure", "shape", "signal", "synthesiser", "system", "tower", "transmitter", "traveller", "vibration", "warning", "wildlife", ]; pub fn name() -> String { let mut rng = thread_rng(); let first = rng.gen_range(0, FIRSTS.len() - 1); let last = rng.gen_range(0, LASTS.len() - 1); let mut s = String::new(); s.push_str(FIRSTS[first]); s.push(' '); s.push_str(LASTS[last]); s }