So "deck" is your list of 16 cards, and you have another list of their properties: "exposed", which is also a list of 16 elements. You might find it easier to use a loop by the number (index) of the card, e.g.
for num in range [0, 16):
# check the property of the card number 'num' i.e. exposed[num] # do something with the card number 'num' i.e. deck[num]
And when you click on a random card, you can calculate its index from the mouse coordinates, seeing that you know the cards width and the initial positions, so you can update its property in the "exposed" list.
no subject
Date: 2014-10-25 04:58 pm (UTC)for num in range [0, 16):
# check the property of the card number 'num' i.e. exposed[num]
# do something with the card number 'num' i.e. deck[num]
And when you click on a random card, you can calculate its index from the mouse coordinates, seeing that you know the cards width and the initial positions, so you can update its property in the "exposed" list.