resetTest method
void
resetTest()
Implementation
void resetTest() async {
memorySeconds = 0;
startMemoryTimer();
setState(() {
seconds = 0;
waiting = false;
guess = false;
var start = numberOfPics * (picCurrentNum - 1);
var end = start + numberOfPics;
pictures = [];
pictures = getPictures(start, end, numberOfPics);
pictures.shuffle();
_tiles = [];
for (int i = 0; i < numberOfPics; i++) {
_tiles.add(buildPicture(i, pictures[i]));
}
original = [];
moves = 0;
for (Picture picl in pictures) {
original.add(picl);
}
for (int i = 0; i < pictures.length; i++) {
if (i > 0 && i < pictures.length - 1) {
pictures[i - 1].left = pictures[i].name;
pictures[i].right = pictures[i + 1].name;
} else if (i == 0) {
pictures[i].right = pictures[i + 1].name;
} else if (i == pictures.length - 1) {
pictures[i - 1].left = pictures[i].name;
}
}
});
}