tick method

bool tick([
  1. double? now
])

Avança o relógio: estouro vira revelação de 1,5 s, e o fim da revelação avança para a próxima. Devolve true se algo mudou (entrou ou saiu da revelação).

Implementation

bool tick([double? now]) {
  if (done) return false;
  final at = now ?? _now();
  if (now != null) _lastTick = now;
  if (tempo != null) return _tickTempo(at);
  if (revealing) {
    if (at >= _revealUntil) {
      revealing = false;
      index++;
      if (!done) _startAt = at;
      return true;
    }
    return false;
  }
  final limit = timeLimit;
  if (limit == null) return false;
  if (at - _startAt >= limit) {
    _markWrong();
    revealing = true;
    _revealUntil = at + kAnswerRevealSeconds;
    return true;
  }
  return false;
}