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
This commit is contained in:
2026-10-07 23:59:05 +08:00
parent 9318a07fa0
commit 32861fc58f
5 changed files with 173 additions and 2 deletions
+5
View File
@@ -12,3 +12,8 @@ def test_challenge_names_are_unique() -> None:
def test_palette_has_only_non_empty_names() -> None:
assert constants.COLOR_PALETTE
assert all(name for name in constants.COLOR_PALETTE)
def test_polygon_range_runs_from_triangle_to_decagon() -> None:
assert constants.MIN_POLYGON_SIDES == 3
assert constants.MAX_POLYGON_SIDES == 10