generated from mwc/lab_iteration
resubmitting
This commit is contained in:
14
tile_grid.py
14
tile_grid.py
@@ -10,7 +10,19 @@ 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.)
|
||||
(The width, height, and tile_size are input when running the program
|
||||
from the terminal. The tile_function determines the pattern drawn on the
|
||||
tile, and when the tile_function argument is called, it passes and runs
|
||||
the function draw_tile from tile.py, because it is the last function it
|
||||
encountered...?
|
||||
|
||||
The "for y in range(height):" calls a loop determined by the the number of
|
||||
rows indicated by the height. The "for x in range(width):" calls a loop
|
||||
determined by the number of columns indicated by the width. The program
|
||||
draws a complete row, then stops drawing and returns to the horizontal
|
||||
starting point and moves up one tile length. It returns to the origin at
|
||||
the very end.)
|
||||
|
||||
"""
|
||||
for y in range(height):
|
||||
for x in range(width):
|
||||
|
||||
Reference in New Issue
Block a user