answer method

  1. @override
void answer(
  1. int choice,
  2. double beat
)
override

Um botão: é a resposta da primeira pergunta aberta cuja janela cobre o beat. Depois de uma pergunta, uma resposta que chega tarde não conta.

Implementation

@override
void answer(int choice, double beat) {
  if (_finished) return;
  for (var k = 0; k < questions.length; k++) {
    final question = questions[k];
    if (beat < question.beat - _eps) return;
    if (_closed[k] || beat > question.beat + window + _eps) continue;
    _close(k, choice);
    return;
  }
}