Initial start on refactoring

This commit is contained in:
Tony Bark 2025-04-28 05:28:18 -04:00
parent ef67e19c75
commit f710a9b109
3 changed files with 33 additions and 0 deletions

1
GlobalUsing.cs Normal file
View file

@ -0,0 +1 @@
global using System.Text.Json;

16
PersonalityGen.cs Normal file
View file

@ -0,0 +1,16 @@
namespace PersonaForge;
public static class PersonalityGen
{
int MaxPoints = 10;
int TotalBudget = 25;
public static PersonalityProfile GeneratePersonalityProfile()
{
var profile = PersonalityProfile.Create();
var traits = new List<string> { "Outgoing", "Nice", "Playful", "Neat", "Active" };
return profile;
}
}

16
PersonalityProfile.cs Normal file
View file

@ -0,0 +1,16 @@
namespace PersonaForge;
public class PersonalityProfile
{
public int Outgoing { get; set; }
public int Nice { get; set; }
public int Playful { get; set; }
public int Neat { get; set; }
public int Active { get; set; }
public static PersonalityProfile Create() => new();
public int TotalPoints() => Outgoing + Nice + Playful + Neat + Active;
public string ToJson() => JsonSerializer.Serialize(this, new JsonSerializerOptions { WriteIndented = true });
}