im trying create cards matching game. normally these type of games they match paired cards together (with the same file name "A.jpg with A.jpg")
but in my case, im matching cards with different names "B.jpg with A.jpg" (correct), "C.jpg with D.jpg" (correct) but with "B.jpg with C.jpg" (incorrect answer).
A.jpg-B.jpg <--correct
C.jpg-D.jpg <--correct
E.jpg-F.jpg <--correct
i face a problem when i generate the cards in random. I manage to generate random cards but i dont manage to generate it with their paired onces. Below is an illustration of the problem
A.jpg-B.jpg <--correct
C.jpg-F.jpg <--incorrect
so how should i code it so that it always generate with their paired onces, so that my game can proceed?