Removed on_click(), it wasn't useful

This commit is contained in:
ben 2022-07-28 13:36:47 -05:00
parent 679f5e71fc
commit c61d3878fe
2 changed files with 0 additions and 10 deletions

View file

@ -19,15 +19,6 @@ class Card(ImageSprite):
self.temp_count = 0 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): def flip_card(self):
if self.image == self.card_back: if self.image == self.card_back:
self.image = self.card_front self.image = self.card_front

View file

@ -60,7 +60,6 @@ while game_is_running:
for card in cards: for card in cards:
if card.is_clicked(): if card.is_clicked():
clicked_cards.append(card) clicked_cards.append(card)
card.on_click()
card.flip_card() card.flip_card()
cards[0].move(1, 0) cards[0].move(1, 0)
pygame.display.flip() pygame.display.flip()