I changed the pattern of the tiles and added the docstring to the function.

Checkpoint 3:
- I will definitely use docstrings in the future.  I will use them because they are helpful in showing another person what each function does.  Also, when I am debugging my code it will be helpful if I know what each function is supposed to be doing.
This commit is contained in:
jwberent
2025-09-11 18:29:45 -04:00
parent 70b1c4b1c8
commit c50ef8c836
2 changed files with 6 additions and 1 deletions

View File

@@ -4,6 +4,11 @@ def draw_tile(size):
"Draws one tile, which can be repeated to form a pattern."
draw_tile_outline(size)
draw_squiggle(size)
draw_squiggle(size/2)
draw_squiggle(size/3)
draw_squiggle(size/4)
draw_squiggle(size/5)
draw_squiggle(size/6)
def draw_tile_outline(size):
pencolor("#dddddd")

View File

@@ -10,7 +10,7 @@ from tile import fly
def draw_tile_grid(width, height, tile_size, tile_function):
"""Draws a (width x height) grid, with tile_function drawn on each tile.
(Your explanation here.)
Line 15 will loop through numbers 0 to the height you give it and save it as y. Line 16 will loop through numbers 0 to the width you give it and save it as x. The rest of the function will make the tiles then go back to the starting point. Then to make more tiles it will use move_up_one_row and continue to make them until the necessary amount of tiles are made.
"""
for y in range(height):
for x in range(width):