本文整理汇总了C#中Candidate.getSanity方法的典型用法代码示例。如果您正苦于以下问题:C# Candidate.getSanity方法的具体用法?C# Candidate.getSanity怎么用?C# Candidate.getSanity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Candidate
的用法示例。
在下文中一共展示了Candidate.getSanity方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: generateJobForCandidate
// Generate a huge list of possible jobs and industries based on the stats of the candidate
public static string generateJobForCandidate(Candidate candidate)
{
// Which sector industry
List<string> sector = new List<string>();
// The job title
List<string> jobTitle = new List<string>();
int intelligence = candidate.getStat("intelligenge");
int morality = candidate.getStat("morality");
int ambition = candidate.getStat("ambition");
int fervor = candidate.getStat("fervor");
int physique = candidate.getStat("physique");
int sanity = candidate.getSanity();
if (intelligence > 50)
{
jobTitle.Add("Scientist");
jobTitle.Add("Engineer");
jobTitle.Add("Doctor");
jobTitle.Add("CEO");
jobTitle.Add("Politician");
} else
{
jobTitle.Add("Reality TV Star");
jobTitle.Add("Lid Tightener");
jobTitle.Add("Crisp Tester");
jobTitle.Add("Professional Drinker");
}
if (morality > 50)
{
jobTitle.Add("Doctor");
jobTitle.Add("Volunteer");
jobTitle.Add("Police Officer");
jobTitle.Add("Priest");
}
else
{
jobTitle.Add("Baliff");
jobTitle.Add("Tobacco Lobbyist");
jobTitle.Add("Politician");
jobTitle.Add("Mercenary");
}
if (ambition > 50)
{
jobTitle.Add("CEO");
jobTitle.Add("Banker");
jobTitle.Add("Politician");
jobTitle.Add("Scientist");
jobTitle.Add("Council Official");
jobTitle.Add("Athlete");
jobTitle.Add("Actor");
}
else
{
jobTitle.Add("Tea Maker");
jobTitle.Add("Lid Tightener");
jobTitle.Add("Clown");
jobTitle.Add("Cat Sitter");
jobTitle.Add("Cleaner");
}
if (fervor > 50)
{
jobTitle.Add("Actor");
jobTitle.Add("Clown");
jobTitle.Add("Mystic");
jobTitle.Add("Reality TV Star");
}
else
{
jobTitle.Add("Data Entry Specialist");
jobTitle.Add("Lid Tightener");
jobTitle.Add("Sofa Tester");
jobTitle.Add("Cat Sitter");
}
if (physique > 50)
{
jobTitle.Add("Mercenary");
jobTitle.Add("Police Officer");
jobTitle.Add("Athlete");
jobTitle.Add("Baliff");
}
else
{
jobTitle.Add("Crisp Tester");
jobTitle.Add("Sofa Tester");
jobTitle.Add("Professional Drinker");
jobTitle.Add("Professional Darts Player");
}
if (sanity < 50)
{
jobTitle.Add("Mad Scientist");
jobTitle.Add("Data Entry Specialist");
jobTitle.Add("Professional Drinker");
}
//.........这里部分代码省略.........
示例2: doctorsNote
private string doctorsNote(Candidate candidate) {
string note = "\nDoctors Psychiatric Assessment: ";
if (candidate.getSanity() < 25) {
note += "subject suffers from multiple dellusions, phobias, and psychosis - should be considered dangerous and restrained at all times.";
}
else if (candidate.getSanity() < 50)
{
note += "past traumas have made the subject paranoid and prone fits of frenzy. Recomend medication.";
}
else if (candidate.getSanity() < 75)
{
note += "subject is neurotic, and has a mild personality disorder. Recomend therapy.";
}
else
{
note += "subject is healthy. No further action.";
}
return note;
}