catness: (catfishbowl)
Cat Gray ([personal profile] catness) wrote in [personal profile] izmeina 2014-10-25 04:58 pm (UTC)

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.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org