30 lines
No EOL
903 B
C#
30 lines
No EOL
903 B
C#
using SimsPersonalityGenerator;
|
|
|
|
var traits = new Dictionary<string, int>
|
|
{
|
|
{ "Outgoing", 0 },
|
|
{ "Nice", 0 },
|
|
{ "Playful", 0 },
|
|
{ "Neat", 0 },
|
|
{ "Active", 0 }
|
|
};
|
|
|
|
Console.WriteLine("Welcome to the Sim Personality Generator!");
|
|
Console.WriteLine("You can prioritize one or more traits to be above 8 by entering them.");
|
|
Console.Write("Enter traits separated by commas (e.g., Outgoing, Nice), or press Enter to generate a random personality: ");
|
|
var prioritizedTraitsInput = Console.ReadLine()?.Trim();
|
|
|
|
// Process the prioritized traits
|
|
var prioritizedTraits = new HashSet<string>(prioritizedTraitsInput.Split(',')
|
|
.Select(t => t.Trim()).Where(t => !string.IsNullOrEmpty(t) && traits.ContainsKey(t)));
|
|
|
|
if (prioritizedTraits.Count > 0)
|
|
{
|
|
Sim.AssignPrioritizedTraits(traits, prioritizedTraits);
|
|
}
|
|
else
|
|
{
|
|
Sim.AssignRandomTraits(traits);
|
|
}
|
|
|
|
Sim.DisplayPersonality(traits); |