Browse Source

Added a translate function

master
Gijs de Heij 4 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)))
def translate(shape, x=0, y=0, space_char=' '):
## TODO implement a negative translation?
translated = [[] for _ in range(y)]
for line in shape:

Loading…
Cancel
Save