Renamed Sim class to TraitGenerator
- Moved TraitGenerator to PersonalityGenerator library
This commit is contained in:
parent
5a68aecb9d
commit
a8717a5177
5 changed files with 47 additions and 6 deletions
9
PersonalityGenerator/PersonalityGenerator.csproj
Normal file
9
PersonalityGenerator/PersonalityGenerator.csproj
Normal file
|
@ -0,0 +1,9 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
|
@ -1,9 +1,9 @@
|
|||
namespace SimsPersonalityGenerator;
|
||||
namespace PersonalityGenerator;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the Sim personality generator with methods to assign traits and display personality.
|
||||
/// </summary>
|
||||
internal static class Sim
|
||||
public static class TraitGenerator
|
||||
{
|
||||
/// <summary>
|
||||
/// The target value for prioritized traits to aim for, typically 8.
|
|
@ -1,4 +1,4 @@
|
|||
using SimsPersonalityGenerator;
|
||||
using PersonalityGenerator;
|
||||
|
||||
var isFinishedSession = false;
|
||||
|
||||
|
@ -32,16 +32,16 @@ void GenerateTraits()
|
|||
if (prioritizedTraits.Count > 0)
|
||||
{
|
||||
// Assign values to the prioritized traits.
|
||||
Sim.AssignPrioritizedTraits(traits, prioritizedTraits);
|
||||
TraitGenerator.AssignPrioritizedTraits(traits, prioritizedTraits);
|
||||
}
|
||||
else
|
||||
{
|
||||
// If no prioritized traits are provided, assign random values to all traits.
|
||||
Sim.AssignRandomTraits(traits);
|
||||
TraitGenerator.AssignRandomTraits(traits);
|
||||
}
|
||||
|
||||
// Display the generated personality traits.
|
||||
Sim.DisplayPersonality(traits);
|
||||
TraitGenerator.DisplayPersonality(traits);
|
||||
|
||||
// Mark the session as finished.
|
||||
isFinishedSession = true;
|
|
@ -8,4 +8,8 @@
|
|||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PersonalityGenerator\PersonalityGenerator.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
28
SimsPersonalityGenerator.sln
Normal file
28
SimsPersonalityGenerator.sln
Normal file
|
@ -0,0 +1,28 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimsPersonalityGenerator", "SimPersonalityGenerator\SimsPersonalityGenerator.csproj", "{A5D8C13E-6B94-4E4E-8591-8906A3ADF113}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PersonalityGenerator", "PersonalityGenerator\PersonalityGenerator.csproj", "{2A84208A-A129-400D-BBFA-37D8DB4B80AF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A5D8C13E-6B94-4E4E-8591-8906A3ADF113}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A5D8C13E-6B94-4E4E-8591-8906A3ADF113}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A5D8C13E-6B94-4E4E-8591-8906A3ADF113}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A5D8C13E-6B94-4E4E-8591-8906A3ADF113}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2A84208A-A129-400D-BBFA-37D8DB4B80AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2A84208A-A129-400D-BBFA-37D8DB4B80AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2A84208A-A129-400D-BBFA-37D8DB4B80AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2A84208A-A129-400D-BBFA-37D8DB4B80AF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Loading…
Add table
Reference in a new issue