Beispiel #1
0
    public void calculateScore(CV cv, Job job)
    {
        
        // Get candidate from CV
        Candidate candidate = cv.getCandidate();

        // Calculate intelligence score
        int intel = candidate.getStat("intelligence");
        intelScore = calcIndividualScore(intel, job.intWeighting);

        // Calculate fervor score
        int fervor = candidate.getStat("fervor");
        fervorScore = calcIndividualScore(fervor, job.ferWeighting);

        // Calculate morality score
        int morality = candidate.getStat("morality");
        moralityScore = calcIndividualScore(morality, job.morWeighting);

        // Calculate ambition score
        int ambition = candidate.getStat("ambition");
        ambitionScore = calcIndividualScore(ambition, job.ambWeighting);

        // Calculate physique score
        int physique = candidate.getStat("physique");
        physiqueScore = calcIndividualScore(physique, job.phyWeighting);

        // Calculate sanity score
        int sanity = candidate.getSanity();
        sanityScore = calcIndividualScore(sanity, job.sanWeighting);

        scoreSum = intelScore + moralityScore + ambitionScore + fervorScore + physiqueScore + sanityScore;

    }