Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple solution in Clear category for Pawn Brotherhood by slickLash
def safe_pawns(pawns):
def is_safe(p):
file, rank = ord(p[0]), int(p[-1])
return (chr(file-1)+str(rank-1) in pawns or
chr(file+1)+str(rank-1) in pawns)
return sum(is_safe(p) for p in pawns)
March 3, 2015
Comments: