Issue fixed, but not in the ideal way. I'm working on that.

This commit is contained in:
maxneedspats 2022-08-01 21:41:21 -05:00
parent 3b266b2169
commit 8d147ad1df

View file

@ -67,14 +67,14 @@ try:
def clicked_card(x, y): def clicked_card(x, y):
""" """
:return: The card which was clicked Appends the card which was clicked on to the list clicked_cards.
""" """
Audio.click()
global clicked_cards global clicked_cards
if len(clicked_cards) == 2:
return None
Audio.click()
for card in cards: for card in cards:
if card.is_mouse_over(x, y) and card.shape()[:10] != 'card_front': if card.is_mouse_over(x, y) and card.shape()[:10] != 'card_front':
if len(clicked_cards) == 2:
clicked_cards = []
card.to_front() card.to_front()
clicked_cards.append(card) clicked_cards.append(card)