I have created a match game that everything so far seems to be working great. However, I just ran into this issue that is making 0 sense to me. I have a method that controls the basic game engine, a method that reveals the card when you click on it, and a delay method. My GOAL is that you click two cards and they both reveal, if there is NOT a match, then they flip back. Obviously if there is a match, they stay. The code to handle BOTH of these behaviors is working. The problem is that when the cards are NOT a match, the second card
actually never appears and then the first cards flips back. I figured a delay after the card is revealed would solve the trick, let both cards display for a few seconds, then flip back. So, I built a delay method that I have tested is delaying properly but when I put it in my code blocks, the programs behavior is not what you would expect. In simple terms:
-> Call game Engine method
---> Call reveal card method
---> execute code for game engine
-------> Delay method gets called BEFORE executing the code to re-hide the cards
Is what I have. BUT, that is not what it is doing. I click the first card, reveals just fine. Then I click the second card, nothing happens for two seconds and then the first card hides indicating that the end code of the engine had been executed. What does not make sense is, why doesn't the reveal method get executed on the second card? It's supposed to go sequentially right? When the game engine method gets called, the very first thing that should happen is the selected card should be revealed. I will post screenshots for visual clarification. Thanks for any help!
