private string GenerateSubstringBasedName(ICreator owner, ISpecies species) { IEnumerable <string> substrings = GetSubstrings(species.GetName()); string result = substrings.Random(); // Perform random modifications to the output string. if (NumberUtilities.GetRandomBoolean()) { result = result.Substring(0, result.Length - 1); // cut off the last vowel if (NumberUtilities.GetRandomBoolean()) { result += new[] { 'a', 'i', 'o', 'u' } }