Generating Random Paired Images in C#
Posted
by Lemon
on Stack Overflow
See other posts from Stack Overflow
or by Lemon
Published on 2010-03-20T19:33:44Z
Indexed on
2010/03/20
19:41 UTC
Read the original article
Hit count: 496
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?
© Stack Overflow or respective owner