Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
intersection solution in Clear category for Pawn Brotherhood by Tarty
def safe_pawns(pawns):
safe = lambda s: {chr(ord(s[0]) - 1) + str(int(s[1]) - 1),
chr(ord(s[0]) + 1) + str(int(s[1]) - 1)}
return sum([bool(set(pawns).intersection(safe(p))) for p in pawns ])
Oct. 19, 2014