MCPcopy Index your code
hub / github.com/geekcomputers/Python / restart_game

Function restart_game

Snake Game Using Turtle/main.py:112–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110 scoreboard.update_scoreboard()
111
112def restart_game():
113 global game_state
114 if game_state == "game_over":
115 game_state = "playing"
116 snake.reset()
117 food.refresh(LEFT_WALL, RIGHT_WALL, BOTTOM_WALL, TOP_WALL)
118 scoreboard.reset()
119
120def is_click_on_button(name, x, y):
121 """Checks if a click (x, y) is within the bounds of a visible button."""

Callers 1

handle_clickFunction · 0.85

Calls 2

refreshMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected