public static string generateWord(int length) { var sb = new StringBuilder(); if (Game.Random.Next(10) == 1) { sb.Append(vowels.getRandom()); if (Game.Random.Next(2) == 1) { sb.Append(consonants.getRandom()); } } //if (Game.random.Next(6) == 1) // Game.threadDangerSB.Append(consonants.getRandom()); for (int i = 0; i < length; i += 2) { sb.Append(consonants.getRandom()).Append(vowels.getRandom()); if (Game.Random.Next(5) == 1 || length == 2) { sb.Append(consonants.getRandom()); } } return(UtilsMy.FirstLetterToUpper(sb.ToString())); //return Game.threadDangerSB.ToString(); }
public string generateCultureName() { result.Clear(); result.Append(prefix.getRandom()); //result.Append(UtilsMy.FirstLetterToUpper(RandWord.Models.RandomWordGenerator.Word(Game.random.Next(3) + 1, true))); result.Append(UtilsMy.FirstLetterToUpper(ProvinceNameGenerator.generateWord(Game.Random.Next(3, 5)))); result.Append(postfix.getRandom()); return(result.ToString()); }
public string generateProvinceName() { result.Clear(); result.Append(prefix.getRandom()); if (Game.Random.Next(3) == 1) { result.Append(generateWord(Game.Random.Next(2, 5))); } else { result.Append(generateWord(Game.Random.Next(3, 5))); } result.Append(postfix.getRandom()); return(UtilsMy.FirstLetterToUpper(result.ToString())); }