Browse Source

Cosmetic update.

Andy Teijelo Pérez 5 years ago
parent
commit
904c34ac73
1 changed files with 10 additions and 1 deletions
  1. 10 1
      main.py

+ 10 - 1
main.py

@@ -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)