makeGuess method

void makeGuess()

make a guess and check if its correct

Implementation

void makeGuess() {
  if (conCurrentNum == numberOfTests) {
    sWidget.eventLogger.testEnded();
    visualScoreList.add(seconds);
    testTimer?.cancel();
    seconds = 0;

    continuousVisualTrackingScore =
        sWidget.activity.calculateScore({'mistakes': mistakes});
    RPVisualTrackingResult visualTrackingResult =
        RPVisualTrackingResult.fromResults(
            mistakes, visualScoreList, continuousVisualTrackingScore);
    sWidget.onResultChange(visualTrackingResult.results);
    if (sWidget.activity.includeResults) {
      sWidget.eventLogger.resultsShown();
      setState(() {
        finished = true;
      });
    }
  } else {
    visualScoreList.add(seconds);
    testTimer?.cancel();
    seconds = 0;
    conCurrentNum += 1;
    resetTest();
  }
}