()
| 75 | |
| 76 | # Function to reset the game state for a new game |
| 77 | def reset_game(): |
| 78 | global score, lives_remaning, eggs |
| 79 | for egg in eggs: |
| 80 | c.delete(egg) |
| 81 | eggs = [] |
| 82 | score = 0 |
| 83 | lives_remaning = 3 |
| 84 | c.itemconfigure(score_text, text='Score : ' + str(score)) |
| 85 | c.itemconfigure(lives_text, text='Lives : ' + str(lives_remaning)) |
| 86 | # Restart egg creation and movement |
| 87 | win.after(1000, create_eggs) |
| 88 | win.after(1000, move_eggs) |
| 89 | win.after(1000, catch_check) |
| 90 | |
| 91 | # Function to decrease lives |
| 92 | def lose_a_life(): |