diff --git a/__pycache__/tile.cpython-312.pyc b/__pycache__/tile.cpython-312.pyc new file mode 100644 index 0000000..4e568ec Binary files /dev/null and b/__pycache__/tile.cpython-312.pyc differ diff --git a/__pycache__/tile_grid.cpython-312.pyc b/__pycache__/tile_grid.cpython-312.pyc new file mode 100644 index 0000000..6ec0608 Binary files /dev/null and b/__pycache__/tile_grid.cpython-312.pyc differ diff --git a/tile.py b/tile.py index 697cf8e..adc3916 100644 --- a/tile.py +++ b/tile.py @@ -10,15 +10,15 @@ def draw_tile_outline(size): square(size) def draw_squiggle(size): - forward(size/4) + forward(3*size/4) pencolor("black") left(90) - quarter_arc_right(size/4) - quarter_arc_left(size/4) quarter_arc_left(size/4) quarter_arc_right(size/4) + quarter_arc_right(size/4) + quarter_arc_left(size/4) left(90) - fly(size/4) + fly(3*size/4) left(90) fly(size) left(90) @@ -42,3 +42,5 @@ def quarter_arc_right(radius): def quarter_arc_left(radius): "Draws a quarter of an arc, turning to the left." circle(radius, 90) + +input() \ No newline at end of file diff --git a/tile_grid.py b/tile_grid.py index 72a0f43..eabbec8 100644 --- a/tile_grid.py +++ b/tile_grid.py @@ -10,7 +10,15 @@ 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.) + (draw tile grid creates a grid where width represents how many tiles wide, + heigh represents how many tiles high, tile_size represents the length of 1 side + of the tile, and tile_function represents what is drawn inside the tile like draw_squiggle + from tile.py. The function will draw 1 tile then fly the length of tile_size to move + on to draw the next tile. Then it will return to the beginning of the row by flying + backwards the length of each tile side time the number of tiles in the width. Then the + function will move up to draw the next row by turning and flying to reset. This will + repeat for as many times as the height calls for. At the very end the cursor will move + back to the very beginning by turning and flying the tile_size times the height.) """ for y in range(height): for x in range(width): @@ -36,7 +44,8 @@ def move_up_one_row(tile_size): fly(tile_size) right(90) - + +done()