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('wall')
label = 'wall %i %i' % (x,y)
mapping = floodfill(cnf, label, adj, size, exact=True, seed=(x,y))
cnf.comment('link')
for x2,y2 in mapping:
    cnf.write(if_then(f(mapping[(x2,y2)]), -f('base', x2, y2)))
Name:
Mail: (not shown)

Please type this: