Commit Graph
3 Commits
Author SHA1 Message Date
Tirsvad 32861fc58f Add draw_shape and draw_shapes with tests
draw_shape turns 360 divided by the number of sides after each side and rejects
fewer than 3 sides. draw_shapes draws a triangle up to a decagon, each in a color
from the palette.

Task: MIL-003#3
Task: MIL-003#4
Task: MIL-003#5
2026-10-07 23:59:05 +08:00
Tirsvad 9318a07fa0 Add random_color and the color palette
random_color returns an immutable (red, green, blue) tuple of integers from 0 to 255
and random_palette_color picks a named color. Both take an optional random.Random
so that tests can seed them.

Task: MIL-003#1
Task: MIL-003#2
2026-10-07 23:59:02 +08:00
Tirsvad b3153b9dc1 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
2026-10-07 23:58:56 +08:00