validateMovements function
Function that checks all the movements in a array it only returns the list of valid ones.
Implementation
List<List<int>> validateMovements(List<List<int>> movements) {
List<List<int>> validMovements = [];
final BoardData board = BoardData();
int temp = 0;
for (int i = 0; i < movements.length; i++) {
_validateMovement(movements[i], temp, board, validMovements);
}
return validMovements;
}