SAT Flood Fill

A SAT function required for many nikoli puzzles.

Comments are moderated. It may take a few minutes before your comment appears.
Markdown is supported in your comments.

cnf.comment("stream")
mapping = floodfill(cnf, 'stream', adj, z_dim, seed=seed)
cnf.comment("stream summary")
for x,y in mapping:
    cnf.write(if_then(f(*mapping[(x,y)]), f('base', x, y)))
Name:
Mail: (not shown)

Please type this: