calculateScore method
The score is the number of mistakes made during the test. If the number of mistakes > 2, the test is failed and a score of 0 is returned. Otherwise, a score of 1 is returned.
Implementation
@override
int calculateScore(dynamic result) => (result['mistakes'] as int > 2) ? 0 : 1;