Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def noFrags(cords, j):
- x1 = cords[j][0]
- y1 = cords[j][1]
- for i in range(j + 1, len(cords) - 1):
- x2 = cords[i][0]
- y2 = cords[i][1]
- if (x1 + y1 == x2 + y2) or \
- (x1 - y1 == x2 - y2):
- return False
- if x1 == x2 or y1 == y2:
- return False
- return True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement