예제 #1
0
파일: pentominoes.py 프로젝트: dc25/puzzler
 def coordinates(self):
     for coord in Pentominoes.coordinates(self):
         x, y = coord
         xy = x + y
         x_y = x - y
         if (5 <= xy <= 15) and (-5 <= x_y <= 5):
             yield coord
예제 #2
0
 def coordinates(self):
     for coord in Pentominoes.coordinates(self):
         x, y = coord
         xy = x + y
         x_y = x - y
         if (5 <= xy <= 15) and (-5 <= x_y <= 5):
             yield coord
예제 #3
0
파일: pentominoes.py 프로젝트: dc25/puzzler
 def coordinates(self):
     max_xy = self.width - self.height
     for coord in Pentominoes.coordinates(self):
         x, y = coord
         xy = x - y
         if 0 <= xy <= max_xy:
             yield coord
예제 #4
0
 def coordinates(self):
     max_xy = self.width - self.height
     for coord in Pentominoes.coordinates(self):
         x, y = coord
         xy = x - y
         if 0 <= xy <= max_xy:
             yield coord
예제 #5
0
파일: pentominoes.py 프로젝트: dc25/puzzler
 def coordinates(self):
     center = (self.width + 1) / 2
     for coord in Pentominoes.coordinates(self):
         x, y = coord
         if (  ((x < center) and (x <= y < x + 4))
               or ((x >= center)
                   and ((self.width - x) <= y < (self.width - x + 4)))):
             yield coord
예제 #6
0
 def coordinates(self):
     center = (self.width + 1) / 2
     for coord in Pentominoes.coordinates(self):
         x, y = coord
         if (((x < center) and (x <= y < x + 4))
                 or ((x >= center) and ((self.width - x) <= y <
                                        (self.width - x + 4)))):
             yield coord
예제 #7
0
파일: pentominoes.py 프로젝트: dc25/puzzler
 def coordinates(self):
     for coord in Pentominoes.coordinates(self):
         x, y = coord
         if ((x > 6) or (y > 6)) and (-7 <= y - x <= 7):
             yield coord
예제 #8
0
파일: pentominoes.py 프로젝트: dc25/puzzler
 def coordinates(self):
     for coord in Pentominoes.coordinates(self):
         x, y = coord
         xy = x + y
         if xy >= (self.height - 1) and ((x > 6) or (y > 6)):
             yield coord
예제 #9
0
파일: pentominoes.py 프로젝트: dc25/puzzler
 def coordinates(self):
     for coord in Pentominoes.coordinates(self):
         x, y = coord
         xy = x + y
         if xy >= (self.height - 1) and xy < (self.height * 2 - 10):
             yield coord
예제 #10
0
파일: pentominoes.py 프로젝트: dc25/puzzler
 def coordinates(self):
     for coord in Pentominoes.coordinates(self):
         x, y = coord
         xy = x + y
         if xy >= 6:
             yield coord
예제 #11
0
 def coordinates(self):
     for coord in Pentominoes.coordinates(self):
         x, y = coord
         if ((x > 6) or (y > 6)) and (-7 <= y - x <= 7):
             yield coord
예제 #12
0
 def coordinates(self):
     for coord in Pentominoes.coordinates(self):
         x, y = coord
         xy = x + y
         if xy >= (self.height - 1) and ((x > 6) or (y > 6)):
             yield coord
예제 #13
0
 def coordinates(self):
     for coord in Pentominoes.coordinates(self):
         x, y = coord
         xy = x + y
         if xy >= (self.height - 1) and xy < (self.height * 2 - 10):
             yield coord
예제 #14
0
 def coordinates(self):
     for coord in Pentominoes.coordinates(self):
         x, y = coord
         xy = x + y
         if xy >= 6:
             yield coord