Exemple #1
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
Exemple #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
Exemple #3
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
Exemple #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
Exemple #5
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
Exemple #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
Exemple #7
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
Exemple #8
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
Exemple #9
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
Exemple #10
0
 def coordinates(self):
     for coord in Pentominoes.coordinates(self):
         x, y = coord
         xy = x + y
         if xy >= 6:
             yield coord
Exemple #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
Exemple #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
Exemple #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
Exemple #14
0
 def coordinates(self):
     for coord in Pentominoes.coordinates(self):
         x, y = coord
         xy = x + y
         if xy >= 6:
             yield coord