Add the command line entry point
CI / checks (pull_request) Successful in 1m13s

python -m turtle_challenges <challenge> and the turtle-challenges command open a
window, run the named challenge and wait for a click. square and dashed-line are
registered; a missing Tk is reported with a hint instead of a traceback.

Task: MIL-002#6
This commit is contained in:
2026-10-07 23:58:56 +08:00
parent a34bf6bbc2
commit b3153b9dc1
7 changed files with 235 additions and 4 deletions
+12
View File
@@ -31,3 +31,15 @@ DASH_LENGTH = 10
## Challenge 2: length of the gap after each dash, in turtle units.
GAP_LENGTH = 10
## Command line name of challenge 1.
CHALLENGE_SQUARE = "square"
## Command line name of challenge 2.
CHALLENGE_DASHED_LINE = "dashed-line"
## Names of the challenges on the command line, in the order of the course.
CHALLENGE_NAMES: tuple[str, ...] = (
CHALLENGE_SQUARE,
CHALLENGE_DASHED_LINE,
)