checkEndGame method
override
Returns true if :
- The number of
_goodAnsweris equal to the length of_questions - The number lives fall to 0
Implementation
@override
bool checkEndGame() {
if (exerciseInfo != null && _goodAnswer == _questions.length) {
apiBase.completeExercise(exerciseInfo!.id);
}
return (_goodAnswer == _questions.length || lives == 0);
}