HumanTiming constructor

HumanTiming({
  1. required StudentProfile profile,
  2. required Random rng,
  3. bool guided = false,
})

Implementation

HumanTiming({
  required StudentProfile profile,
  required Random rng,
  this.guided = false,
}) : _profile = profile,
     _rng = rng,
     _identity = identical(profile, StudentProfile.perfect),
     gains = TimingGains.of(profile),
     // O sorteio do aluno (sentido do acorde e adiantamento da melodia) é feito
     // uma vez, na criação: é o mesmo aluno em toda a rodada.
     _chordDirection = rng.nextBool() ? 1 : -1,
     _melodyLeadMs =
         kMelodyLeadMinMs +
         rng.nextDouble() * (kMelodyLeadMaxMs - kMelodyLeadMinMs);