Added a translate function
This commit is contained in:
parent
76657435c4
commit
3ef09ab552
@ -52,6 +52,7 @@ def print_lines (lines):
|
|||||||
stdout.write('{}\n'.format(''.join(line)))
|
stdout.write('{}\n'.format(''.join(line)))
|
||||||
|
|
||||||
def translate(shape, x=0, y=0, space_char=' '):
|
def translate(shape, x=0, y=0, space_char=' '):
|
||||||
|
## TODO implement a negative translation?
|
||||||
translated = [[] for _ in range(y)]
|
translated = [[] for _ in range(y)]
|
||||||
|
|
||||||
for line in shape:
|
for line in shape:
|
||||||
|
Loading…
Reference in New Issue
Block a user