Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
chess solution in Clear category for Pawn Brotherhood by Piotr.Helminiak
def safe_pawns(pawns):
safe=0
position = set()
for p in pawns:
c = ord(p[0])
r = int(p[1])
position.add((r, c))
for r, c in position:
if (((r - 1, c - 1) in position) or ((r - 1, c + 1) in position)):
safe+=1
return safe
Oct. 22, 2016