"Random" card chooser

Hi,
I've been kind of persistent about this problem. Every time I try something new, the program solves the problem and creates a new one. So this time, every card turns over when asked to, but against the rules I put up, more than two of each type of card is shown. Here's the general rule I put in for each value of CardValue (which determines the back of the card):
When self.CardValue = 1
and game.1 < 2
--change attribute game.1 to game.1+1
When actor receives event touch is pressed:
--when self.CardValue = 1
----change image to [back_of_card_image]
Why are duplicates appearing?
I've been kind of persistent about this problem. Every time I try something new, the program solves the problem and creates a new one. So this time, every card turns over when asked to, but against the rules I put up, more than two of each type of card is shown. Here's the general rule I put in for each value of CardValue (which determines the back of the card):
When self.CardValue = 1
and game.1 < 2
--change attribute game.1 to game.1+1
When actor receives event touch is pressed:
--when self.CardValue = 1
----change image to [back_of_card_image]
Why are duplicates appearing?