verdict method
- List<
RoundResult> history
override
A rodada sai limpa com o critério da leitura até o 20 (sightCleanRound):
sem erro nenhum. O veredito diz o que ela faz pelo progresso, antes de
gravar.
Implementation
@override
PassVerdict verdict(List<RoundResult> history) {
final last = history.last;
final step = _currentStep;
final (:clean, :why) = sightCleanRound(step, last);
final next = progress.afterRound(wasClean: clean);
final String reason;
if (!clean) {
reason = why ?? roundNotCountedWhy(last);
} else if (next.clean == 0) {
reason = [?why, 'passo ${step.name} concluído'].join(' · ');
} else {
reason = [
?why,
'${next.clean} de $sightCleanToAdvance rodadas limpas',
].join(' · ');
}
return PassVerdict(
roundPassed: clean,
streak: next.clean,
exercisePassed: false,
reason: reason,
measures: sightErrorMeasures(step, last),
);
}