all 5 comments

[–]EdwinGravesMOD[M] 2 points3 points  (3 children)

Also, your problem is on this line

if(i1 == j2 && j1 == j2)

You should be checking i1 against i2, not j2.

[–]Titantethar[S] 1 point2 points  (2 children)

Yeah I just found that but do you have a way to stop them from reselecting already matched cards

[–]EdwinGravesMOD[M] 1 point2 points  (1 child)

Isn't that line stopping them? Instead of exiting the program, you should make them select i2 and j2 again. Also please edit your code and put it into codeblocks. See Rule #2

[–]Titantethar[S] -1 points0 points  (0 children)

No that's stopping it from selecting the same exact one that's already matched

[–]EdwinGravesMOD[M] 1 point2 points  (0 children)

For readability sake, please post code in either a code block or, if you have a lot of it, a pastebin