Milestone 003: Shapes and Random Color #32

Merged
Tirsvad merged 3 commits from mil-003-shapes-and-random-color into mil-002-square-and-dashed-line 2026-10-07 18:42:30 +02:00
3 Commits
Author SHA1 Message Date
Tirsvad c695c47929 Add the shapes challenge to the command line
CI / checks (pull_request) Successful in 1m7s
turtle-challenges shapes draws the polygons. The argument parsing tests already
cover every registered name.

Task: MIL-003#6
2026-10-07 23:59:08 +08:00
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