diff --git a/main.py b/main.py index 75322d8..7e068c4 100755 --- a/main.py +++ b/main.py @@ -104,5 +104,16 @@ if __name__ == "__main__": # if matches(e, constraints): # draw(solution, width, pattern) + fixed = [] for sol in solve2(width, pattern, constraints): + exp = list(expand_solution(sol, width, pattern)) + if len(fixed) == 0: + fixed = exp + else: + for i,e in enumerate(exp): + if fixed[i] != e: + fixed[i] = -1 draw(sol, width, pattern) + + print("invariants:") + print("".join({1:'\N{LEFT SEVEN EIGHTHS BLOCK}',0:'.',-1:'?'}[x] for x in fixed))