public void calculate(double penalty, double maxAllowedTime) { filter_times_over_max(maxAllowedTime); lists.fill(guesses); stats.calculate(guesses, lists); penalties.calculate(stats, penalty); calculate_adjusted(); }
void calculate() { perform_block_calculations(); allGuesses = blockRuns.SelectMany(b => b.guesses).ToList(); lists.fill(allGuesses); stats.calculate(allGuesses, lists); penalties.calculate(stats, testTaken.mistakePenalty); determine_percentages(allGuesses, testTaken.minQuestionTime, testTaken.maxQuestionTime); blockRunGroups = new BlockRunGroups(blockRuns); finalResult = blockRunGroups.finalResult; validate(); }
void calculate_adjusted() { adjustedGuesses = guesses.Select(g => g.Clone()).ToList(); RunLists adjustedLists = new RunLists(); adjustedLists.fill(adjustedGuesses); foreach (var guess in adjustedGuesses) { if (guess.correct == false) { guess.duration = penalties.penaltyAmount; } } statsAdjusted.calculate(adjustedGuesses, adjustedLists); }