Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Pawn Brotherhood by makstheimba
def safe_pawns(pawns):
safe_spots = 0
for col, row in pawns:
cover = [chr(ord(col)+1), chr(ord(col)-1)]
cover = set([pos + str(int(row)-1) for pos in cover])
if cover & pawns:
safe_spots += 1
return safe_spots
Feb. 18, 2015