Battleship

Solving Battleships with SAT

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

def just_water(points):
    water = set((xy[0]+xo, xy[1]+yo) for xy,xo,yo in product(points, [-1,0,1], [-1,0,1]))
    water = (water - set(points)) & in_bounds
    return water
Name:
Mail: (not shown)

Please type this: