epicinium_server 1.0.12

An asynchronous multiplayer server for the strategy game Epicinium.
Documentation
/*
 * Part of epicinium_server
 * developed by A Bunch of Hacks.
 *
 * Originally part of the C++ game Epicinium
 * developed by A Bunch of Hacks.
 *
 * Copyright (c) 2018-2021 A Bunch of Hacks
 *
 * This library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 *
 * [authors:]
 * Sander in 't Veld (sander@abunchofhacks.coop)
 * Daan Mulder (daan@abunchofhacks.coop)
 */

use rand::seq::SliceRandom;

pub fn generate() -> String
{
	let mut rng = rand::thread_rng();
	let a = FIRST.choose(&mut rng).unwrap();
	let b = SECOND.choose(&mut rng).unwrap();
	let c = THIRD.choose(&mut rng).unwrap();

	let mut name = String::with_capacity(a.len() + b.len() + c.len());
	name.push_str(a);
	name.push_str(b);
	name.push_str(c);

	name
}

const FIRST: [&str; 97] = [
	"Superfluous",
	"Amazing",
	"Exciting",
	"Wonderful",
	"Thirsty",
	"Hungry",
	"Woke",
	"Lit",
	"Dope",
	"Sleepy",
	"Underestimated",
	"Drunk",
	"Handsome",
	"Silly",
	"Clumsy",
	"Ancient",
	"Creepy",
	"Colossal",
	"Delightful",
	"Embarrassing",
	"Superb",
	"Mysterious",
	"Gentle",
	"Bewildered",
	"Important",
	"Fiery",
	"Whack",
	"Entertaining",
	"Dank",
	"Impressive",
	"Finicky",
	"Powerful",
	"Stupendous",
	"Chthonic",
	"Evil",
	"Demonic",
	"Lethargic",
	"Dreamy",
	"Angelic",
	"Badass",
	"Secret",
	"Clandestine",
	"Undercover",
	"Stealthy",
	"Unauthorized",
	"Fraudulent",
	"Covert",
	"Sneaky",
	"Influential",
	"Omnipotent",
	"Omnicient",
	"Persuasive",
	"Mighty",
	"Wicked",
	"Mischievous",
	"Wayward",
	"Dreadful",
	"Outrageous",
	"Dangerous",
	"Barbarous",
	"Exemplary",
	"Well-Behaved",
	"Courteous",
	"Scandalous",
	"Wanton",
	"Disgraceful",
	"Graceful",
	"Naughty",
	"Nefarious",
	"Fierce",
	"Dastardly",
	"Barbaric",
	"Heroic",
	"Brazen",
	"Flagrant",
	"Heinous",
	"Scurrilous",
	"Abominable",
	"Notorious",
	"Noble",
	"Ignoble",
	"Spicy",
	"Tyrannical",
	"Defiant",
	"Fantastic",
	"Haughty",
	"Villainous",
	"Diabolical",
	"Omnipresent",
	"Cacophonic",
	"Lightheaded",
	"Allegorical",
	"Wise",
	"Fresh",
	"Respectable",
	"Nihilistic",
	"Satisfactory",
];
const SECOND: [&str; 91] = [
	" Rifleman",
	" Tank",
	" Machinegunner",
	" Settler",
	" Sapper",
	" Militia",
	" Zeppelin",
	" Boys",
	" Girls",
	" Chimpanzee",
	" Caterpillar",
	" Aardvark",
	" Donkey",
	" Moose",
	" Snail",
	" Whale",
	" Platypus",
	" Zebra",
	" Buffalo",
	" Walrus",
	" Wildebeest",
	" Firefighter",
	" Drunks",
	" Hackers",
	" Cuttlefish",
	" Vigilante",
	" Dinosaur",
	" Anteater",
	" Musicians",
	" Superhero",
	" Wizard",
	" Overlord",
	" Astronaut",
	" Rockstar",
	" Ninja",
	" Magician",
	" Dreamers",
	" Hippo",
	" Dragon",
	" Hippopotamus",
	" Firefly",
	" Maniac",
	" Abomination",
	" Spies",
	" Sentinel",
	" Champions",
	" Tyrants",
	" Headbangers",
	" Despot",
	" Individuals",
	" Chicken",
	" Triumphator",
	" Goblin",
	" Hobgoblin",
	" Stamp Collectors",
	" Mathematicians",
	" Philosophers",
	" Scientists",
	" Crook",
	" Desperados",
	" Hoodlum",
	" Culprit",
	" Yardbird",
	" Racketeers",
	" Crook",
	" Guerilla",
	" Gorilla",
	" Alchemists",
	" Cryptozoologists",
	" Drummers",
	" Singers",
	" Guitarists",
	" Bards",
	" Runner-ups",
	" Goody-Two-Shoes",
	" Kung Fu Fighters",
	" Cosmopolitans",
	" Impostors",
	" Samurai",
	" Villains",
	" Wimps",
	" Humans",
	" Weaklings",
	" Dragonling",
	" Earthworm",
	" Winners",
	" Losers",
	" Indie",
	" Nerd",
	" Geek",
	" Daredevil",
];
const THIRD: [&str; 88] = [
	" Gathering",
	" Collective",
	" Syndicate",
	" Federation",
	" Conclave",
	" Conference",
	" Congregation",
	" Convocation",
	" Conspiracy",
	" Assembly",
	" Gang",
	" Party",
	" Convention",
	" Group",
	" Lobby",
	" Union",
	" Society",
	" Rally",
	" Meeting",
	" Assemblage",
	" Association",
	" Committee",
	" Crew",
	", Inc.",
	", Ltd.",
	" Cartel",
	" Partnership",
	" Session",
	" Band",
	" Get-Together",
	" Corporation",
	" Cooperative",
	" Guild",
	" Clan",
	" Pack",
	" Coalition",
	" Club",
	" League",
	" Clique",
	" Fraternity",
	" Sorority",
	" Mob",
	" Confederation",
	" Tribe",
	" Alliance",
	" Affiliation",
	" Fellowship",
	" Circle",
	" Company",
	" Commune",
	" Bunch",
	" Faction",
	" Hangout",
	" Lodge",
	" Order",
	" Outfit",
	" Show",
	" Council",
	" Delegation",
	" Meetup",
	" Congress",
	" Fiesta",
	" Apocalypse",
	" Outbreak",
	" Invasion",
	" Summoning",
	" Conflux",
	" Brawl",
	" Conglomeration",
	" Conventicle",
	" Summit",
	" Forum",
	" Collaboration",
	" Coven",
	" Organization",
	" Camp",
	" Sect",
	" Squad",
	" Bloc",
	" Division",
	" Battalion",
	" Crowd",
	" Horde",
	" Throng",
	" Force",
	" Cemetery",
	" Sanctuary",
	" Refuge",
];