Cosmetic update.

This commit is contained in:
Andy Teijelo Pérez 2016-11-22 10:03:30 -05:00
parent 19a4a5cc6a
commit 904c34ac73

11
main.py
View file

@ -247,7 +247,7 @@ if __name__ == "__main__":
for s, p in zip(solution, pattern):
print('__' * s, end="")
print('\N{FULL BLOCK}\N{LEFT SEVEN EIGHTHS BLOCK}' * p, end="")
print('.' * (width - sum(solution) - sum(pattern)))
print('__' * (width - sum(solution) - sum(pattern)))
# width = int(sys.argv[1])
# pattern = tuple(int(x) for x in sys.argv[2].split())
@ -311,3 +311,12 @@ if __name__ == "__main__":
))
c.solve(print)
# c = Board(([[2, 1], [2, 1, 1], [1, 1, 1, 1], [2, 1], [1, 1, 1], [1, 1, 1, 1], [3], [3, 2, 1], [1, 1, 3, 1],
# [1, 1, 1, 1], [1, 2, 1, 1, 1], [1, 1, 1, 1], [1, 2, 1], [1], [1, 4, 1]],
# [[1, 2, 1], [1, 3, 1], [1, 1, 3], [1, 1, 1], [1, 1], [1, 1], [1, 2, 1, 1, 1], [2, 3, 3, 1, 1],
# [1, 1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1], [1, 2], [1, 1], [1, 1, 1]]))
# c.solve(print)
if len(sys.argv) > 2:
b = Board((parse(sys.argv[1]), parse(sys.argv[2])))
b.solve(print)