I am working with two arrays, the first one looks like this:
$scope.blinkedBoxes=[3,4,1,2,..]
There will be a maximum of 8 elements in this array, each element being a number from 1 to 4.
The second array is as follows:
$scope.clickedImages=[2,4,3,1,...]
I am creating the following function:
$scope.checkCrossCorrectness = function(array1, array2){}
My goal is:
If the first element of $scope.blinkedBoxes
is 2 (or any number from 1 to 4), then the first element of $scope.clickedImages
cannot be 2 (or the same as the first element of the first array), it must be 1, 3, or 4. This rule applies to the subsequent elements as well (for example, if the second element in the first array is 3, then the second element in the second array can be 1, 2, or 4).
How should I go about implementing this logic?