Have to write a concentration (memory) game for my beginners VB class at college. Having a little trouble with some of my syntax. What I am trying to do is use IF statements to compare each individual picturebox in order that I define them to the other pictureboxes I have defined before them. I am doing this to ensure that I end up with the exactly the right number of matches with no extra cards without matches. For example I have 28 cards in the game. Cards 1-14 are all different pictures. Cards 15-28 are the matches for the first 14 cards. What I want to do is randomely place these 28 cards on the board without duplicating any one of them twice so that the game ends with exacty 14 matches everytime. once I use the random statement to choose the first card I will use the random statement to choose the second card. I then want to use the if statement to say If card2 = card1 then choose another card until they don't match. Once card2 is a card not matching card1 I will then use the random statement to choose card three. Then I want to use the If statement to say if card3 = card2 or card1 choose another card until they don't match.
***Long story short is how do you use the if statement correctly to compare more than two items? (Ex: if card5 = card1 or card2 or card3 or card4 then) Any help would be greatly appreciated and if I have confused any on then I can try to make it clearer if necessary.***
***Long story short is how do you use the if statement correctly to compare more than two items? (Ex: if card5 = card1 or card2 or card3 or card4 then) Any help would be greatly appreciated and if I have confused any on then I can try to make it clearer if necessary.***