Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Simple solution in Clear category for Pawn Brotherhood by JumpCutter
def safe_pawns(pawns):
# Converts pawns into interger coords
pawns = [("abcdefgh".index(x), int(y)) for x, y in pawns]
safe = 0
for x, y in pawns:
bl, br = (x - 1, y - 1), (x + 1, y - 1)
if bl in pawns or br in pawns:
safe += 1
return safe
Dec. 3, 2014
Comments: