Browse Source

Added a translate function

master
Gijs de Heij 5 years ago
parent
commit
3ef09ab552
  1. 1
      asciiWriter/utils.py

1
asciiWriter/utils.py

@ -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…
Cancel
Save