public static string GenerateCompliment(Random random) { string adjective = adjectiveSelector.GetRandomItem(); string bodyPart = bodyPartSelector.GetRandomItem(); bool isPlural = bodyPart.EndsWith("s"); return(complimentSelector.GetRandomItem() .Replace("{BODY_PART}", bodyPart) .Replace("{IS_ARE}", isPlural ? "are" : "is") .Replace("{POSITIVE_ADJ}", adjective) .Replace("{A_OR_BLANK}", isPlural ? "" : "a ")); }
public static User UserGenerator(Random random) { Gender gender = random.Next(2) == 0 ? Gender.Male : Gender.Female; return(new User((gender == Gender.Female ? femaleFirstNameSelector.GetRandomItem() : maleFirstNameSelector.GetRandomItem()), lastNameSelector.GetRandomItem(), gender, random.Next(MAX_START_CONVERSION_CHANCE - MIN_START_CONVERSION_CHANCE) + MIN_START_CONVERSION_CHANCE, random.NextDouble() * 10f)); }
public static string GenerateComplimentResponse(Random random, int cultChance) { if (cultChance < 40) { return(complimentResponseLowSelector.GetRandomItem()); } else if (cultChance < 80) { return(complimentResponseMidSelector.GetRandomItem()); } else { return(complimentResponseHighSelector.GetRandomItem()); } }
public static string GenerateJoinCultResponse(Random random, bool success) { return(success ? cultJoinResponseAcceptSelector.GetRandomItem() : cultJoinResponseRejectSelector.GetRandomItem()); }
public static string GenerateAbort(Random random) { string bodyPart = bodyPartSelector.GetRandomItem(); return(abortSelector.GetRandomItem().Replace("{BODY_PART}", bodyPart)); }