-
Notifications
You must be signed in to change notification settings - Fork 0
/
finder_y.py
33 lines (23 loc) · 867 Bytes
/
finder_y.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from finder import *
###############################################################################
class ShapeYFinder(ShapeFinder):
def find_gauges(self):
self.total_status = len(self.xshapes)
self.gauges = self.generator.gauges
# Choose the X shape
for xshape in self.xshapes:
self.update_status()
if (not self.commutes_with_gauges(xshape)):
continue
for zshape in self.zshapes:
if (zshape.commutes_with(xshape)):
continue
if (not self.commutes_with_gauges(zshape)):
continue
yshape = Shape.multiply(xshape, zshape)
if (yshape.commutes_with(zshape) or yshape.commutes_with(xshape)):
continue
if (not self.commutes_with_gauges(yshape)):
continue
self.add_gauge(xshape, yshape, zshape)
break