MCPcopy Index your code
hub / github.com/ndleah/python-mini-project / reset_game

Function reset_game

Egg_Catcher/eggcatcher.py:77–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75
76# Function to reset the game state for a new game
77def 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
92def lose_a_life():

Callers 1

egg_droppedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected