Main click handler to delegate actions based on button clicks.
(x, y)
| 126 | return False |
| 127 | |
| 128 | def handle_click(x, y): |
| 129 | """Main click handler to delegate actions based on button clicks.""" |
| 130 | if game_state == "start" and is_click_on_button("Play", x, y): |
| 131 | start_game() |
| 132 | elif game_state == "playing" and is_click_on_button("Pause", x, y): |
| 133 | toggle_pause_resume() |
| 134 | elif game_state == "paused" and is_click_on_button("Resume", x, y): |
| 135 | toggle_pause_resume() |
| 136 | elif game_state == "game_over" and is_click_on_button("Restart", x, y): |
| 137 | restart_game() |
| 138 | |
| 139 | # --- KEYBOARD HANDLERS --- |
| 140 | def handle_snake_up(): |
nothing calls this directly
no test coverage detected