Legion2005
In Runtime
- Messages
- 119
Ok, I also have a friend who needs help with a memory program (the flip two cards and match them memory card game)...
"I have the entire game nearly done except for one major problem. I have it so there are 16 cards... 8 matches total. At the form load the cards are randomly shuffled and placed... face down. Now I need to use the flag variable blnFirstTurn to determine when I click a card if it's my first card or second card turned over. At the beginning, the flag is true. After the first card is picked, it's changed to false. The cards are in a control array, and the variable intFirstPick is set equal to the Index of the control. At the end of the procedure blnFirstTurn is set to false. Then when it is clicked again, an If statement calls a sub procedure to test for a match. My problem is that when I click the first and second cards, it works. Then the second card I picked is being saved like it's the first card picked for the next turn. Can anyone help and maybe give me some helpful code?"
"I have the entire game nearly done except for one major problem. I have it so there are 16 cards... 8 matches total. At the form load the cards are randomly shuffled and placed... face down. Now I need to use the flag variable blnFirstTurn to determine when I click a card if it's my first card or second card turned over. At the beginning, the flag is true. After the first card is picked, it's changed to false. The cards are in a control array, and the variable intFirstPick is set equal to the Index of the control. At the end of the procedure blnFirstTurn is set to false. Then when it is clicked again, an If statement calls a sub procedure to test for a match. My problem is that when I click the first and second cards, it works. Then the second card I picked is being saved like it's the first card picked for the next turn. Can anyone help and maybe give me some helpful code?"