Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def openAroundZero(self, c):
- xleft= -1 if c.x>0 else 0
- xright=1 if c.x<self.size - 1 else 0
- yleft=-1 if c.y>0 else 0
- yright=1 if c.y<self.size - 1 else 0
- c.isOpened = True
- if c.value ==0:
- цикл по xshift от xleft до xright
- цикл по yshift от yleft до yright
- target=self[c.x+xshift][c.y+yshift]
- target.isOpened=True
- if target.value==0:
- openAroundZero(target)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement