findKeyCourseUse function
find-key com as notas da rodada, na ordem (TI04), a regra da oitava e o
tempo por pergunta do passo (time-limit, se houver).
Implementation
CourseUse findKeyCourseUse({
required ({String id, String title, int accuracy}) head,
required List<Pitch> notes,
required OctaveRule octave,
int? timeLimit,
}) {
final block = _block([
'id: ${head.id}',
'type: find-key',
'title: ${head.title}',
'notes: [${notes.join(', ')}]',
'octave: ${octave.wire}',
'pass: {accuracy: ${head.accuracy}'
'${timeLimit == null ? '' : ', time-limit: $timeLimit'}}',
]);
return CourseUse(
text: block,
notes: const [
'As notas são as desta rodada, sempre nessa ordem. Para o app sortear '
'outras a cada vez, troque a lista por um sorteio, como '
'`notes: {random: C4-B4, count: 10}`.',
],
);
}