Concentration Game

Gaming Programming

The game involves 6 pairs of cards, i.e. a total of 12 cards. Both cards in a pair have the same unique face color, either red, yellow, green, blue, magenta, or orange. That is, there are two cards of each of these six colors.The back of every card is gray. All the cards are initially face down, arranged in some random order. Clicking on a card turns it over. For all cards except the very first card flipped over, your code does this: if the card revealed matches, i.e. has the same face color as, the card that was revealed by the previous click, then both cards remain face up. Otherwise, both are returned face down. The game ends when all cards are face up. Your program should count the number of cards clicked by the user and print out this count to the console when all the card pairs have been identified.