apply method

HumanErrorPlan apply(
  1. List<PlannedNote> notes, {
  2. required RoundTiming timing,
  3. int attempt = 0,
})

Põe os erros em notes (as notas que o aluno toca, planejadas), no tempo timing da rodada. attempt é a tentativa do compasso (AV08; 0 é a primeira vez): a chance cai com ela (StudentProfile.attemptFactor).

Implementation

HumanErrorPlan apply(
  List<PlannedNote> notes, {
  required RoundTiming timing,
  int attempt = 0,
}) {
  if (notes.isEmpty || gains.baseChance <= 0) {
    return HumanErrorPlan(notes: List.of(notes), errors: const []);
  }
  final r = _Round(
    notes,
    timing,
    attemptFactor: profile.attemptFactor(attempt),
  );
  for (var k = 0; k < r.length; k++) {
    if (r.works[k].gone) continue;
    _stretch(r, k);
    if (r.works[k].used) continue;
    _draw(r, k);
  }
  return r.result();
}