Inverted if statement

This commit is contained in:
maxneedspats 2022-08-01 20:02:15 -05:00
parent 0ca1eca5a3
commit 3b266b2169

12
main.py
View file

@ -96,18 +96,18 @@ try:
Audio.unpause_background_music() Audio.unpause_background_music()
end_routine_done = True end_routine_done = True
if len(clicked_cards) == 2: if len(clicked_cards) == 2:
if clicked_cards[0] != clicked_cards[1]: if clicked_cards[0] == clicked_cards[1]:
score += 5
update_score()
Audio.match_made()
matches += 1
else:
time.sleep(1) time.sleep(1)
clicked_cards[0].to_back() clicked_cards[0].to_back()
clicked_cards[1].to_back() clicked_cards[1].to_back()
score -= 1 score -= 1
update_score() update_score()
Audio.no_match() Audio.no_match()
else:
score += 5
update_score()
Audio.match_made()
matches += 1
clicked_cards = [] clicked_cards = []
screen.update() screen.update()