From b14c6d2660c1d2cf9f65a68bae7bb3d53dbe7f7e Mon Sep 17 00:00:00 2001 From: maxneedspats <84929191+maxneedspats@users.noreply.github.com> Date: Wed, 3 Aug 2022 18:59:31 -0500 Subject: [PATCH] Removes card after correct match is made. --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 47db297..dc94d1a 100644 --- a/main.py +++ b/main.py @@ -72,11 +72,11 @@ try: global clicked_cards if len(clicked_cards) == 2: return None - Audio.click() for card in cards: if card.is_mouse_over(x, y) and card.shape()[:10] != 'card_front': card.to_front() clicked_cards.append(card) + Audio.click() def update_score(): @@ -97,6 +97,9 @@ try: end_routine_done = True if len(clicked_cards) == 2: if clicked_cards[0] == clicked_cards[1]: + time.sleep(0.5) + clicked_cards[0].hideturtle() + clicked_cards[1].hideturtle() score += 5 update_score() Audio.match_made()