当前位置: 首页>>代码示例>>C#>>正文


C# Candidate.getSanity方法代码示例

本文整理汇总了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");
        }
//.........这里部分代码省略.........
开发者ID:Scythus,项目名称:InhumanResources,代码行数:101,代码来源:JobsGenerator.cs

示例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;
    }
开发者ID:Scythus,项目名称:InhumanResources,代码行数:21,代码来源:CVGenerator.cs


注:本文中的Candidate.getSanity方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。