-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfinder_basic.py
More file actions
33 lines (23 loc) · 871 Bytes
/
finder_basic.py
File metadata and controls
33 lines (23 loc) · 871 Bytes
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 ShapeBasicFinder(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
for yshape in self.yshapes:
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