Adopt the main flow and the entry point #12

Closed
opened 2026-10-08 11:05:20 +02:00 by Tirsvad · 0 comments
Owner

Copy src/snake_game/main.py, src/snake_game/__main__.py and tests/test_main.py from the base: the screen set-up, the key bindings, the animation loop with game_is_on, the eating check, the game-over check, the wait for a click and the quiet exit when the window is closed. main imports food and scoreboard only when it runs, so importing it needs neither turtle nor tkinter.

Phase: MIL-002

Copy `src/snake_game/main.py`, `src/snake_game/__main__.py` and `tests/test_main.py` from the base: the screen set-up, the key bindings, the animation loop with `game_is_on`, the eating check, the game-over check, the wait for a click and the quiet exit when the window is closed. `main` imports `food` and `scoreboard` only when it runs, so importing it needs neither `turtle` nor `tkinter`. Phase: MIL-002
Tirsvad added this to the MIL-002: Adopt the game milestone 2026-10-08 11:05:20 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Tirsvad-Udemy-100-days-of-code/021-snake-game#12