I'm trying to add a score to my program, But when I run my code a black screen appears and it says that the app isn't responding. Without the score function it runs properly.
Here is my code:
def score_add():
global score
wait(1)
score = score + 1
while not Game_Over:
score_add()
text = font.render("Score: " + str(score), True, (0, 0, 0))
screen.blit(text, (10, 10))
pygame.display.flip()
I've tried removing pygame.display.flip()
Same result.