From c61d3878fe84224787937f9dea9a48272d429fed Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 28 Jul 2022 13:36:47 -0500 Subject: [PATCH] Removed on_click(), it wasn't useful --- card.py | 9 --------- main.py | 1 - 2 files changed, 10 deletions(-) diff --git a/card.py b/card.py index 0468e5f..49e252d 100644 --- a/card.py +++ b/card.py @@ -19,15 +19,6 @@ class Card(ImageSprite): self.temp_count = 0 - def on_click(self): - """ - Is meant to be called when the card is clicked, but that must be implemented by the class which has-a Card. \ - Currently prints the number of times the card has been clicked. - :return: None - """ - self.temp_count += 1 - print(self.temp_count) - def flip_card(self): if self.image == self.card_back: self.image = self.card_front diff --git a/main.py b/main.py index 8882a54..c62833c 100644 --- a/main.py +++ b/main.py @@ -60,7 +60,6 @@ while game_is_running: for card in cards: if card.is_clicked(): clicked_cards.append(card) - card.on_click() card.flip_card() cards[0].move(1, 0) pygame.display.flip()