Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Pawn Brotherhood by watti
def safe_pawns(pawns):
n = 0
for pawn in pawns:
possible1 = chr(ord(pawn[0]) - 1) + str(int(pawn[1]) - 1)
possible2 = chr(ord(pawn[0]) + 1) + str(int(pawn[1]) - 1)
if (possible1 in pawns) or (possible2 in pawns):
n += 1
return n
Dec. 21, 2015