Commit Graph
3 Commits
Author SHA1 Message Date
Tirsvad a34bf6bbc2 Add draw_square and draw_dashed_line with tests
Challenge 1 draws four sides and turns right 90 degrees after each. Challenge 2 puts
the pen down for a dash and up for a gap and leaves it down at the end. Lengths and
counts come from constants.py; invalid values raise ValueError.

Task: MIL-002#3
Task: MIL-002#4
Task: MIL-002#5
2026-10-07 23:58:52 +08:00
Tirsvad e2249de46e Add the Pen protocol, window helpers and a recording fake turtle
The drawing functions take a Pen, the part of turtle.Turtle they use, so a test can
pass a fake that records every call. window.py is the only module that imports
turtle, and it does so inside the functions so that importing the package needs no Tk.

Task: MIL-002#1
Task: MIL-002#2
2026-10-07 23:58:50 +08:00
Tirsvad 2cd19dfd03 Add project configuration, .gitignore and the package skeleton
pyproject.toml declares Python 3.13 or later, an empty runtime dependency list and
pytest, ruff and mypy as development tools. The package has constants.py, the one
place for constants, and a smoke test keeps the test run green.

Task: MIL-001#1
Task: MIL-001#2
Task: MIL-001#3
2026-10-07 23:58:37 +08:00