MCPcopy Create free account
hub / github.com/asweigart/PythonStdioGames / drawTile

Function drawTile

inprogress/tsuromapmaker.py:77–81  ·  view source on GitHub ↗
(tile, x, y, canvas)

Source from the content-addressed store, hash-verified

75
76
77def drawTile(tile, x, y, canvas):
78 # `tile` is one of the strings from `TILES`
79 for ix in range(x, x + 5):
80 for iy in range(y, y + 5):
81 canvas[ix, iy] = TILE_MAP[tile[ix-x + (5 * (iy-y))]]
82
83
84def rotateTileClockwise(tile, rotations): # rotations are clockwise at 90 degree increments

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected