MCPcopy Create free account
hub / github.com/JoshuaPostel/texaform / __init__

Method __init__

python/gather.py:16–27  ·  view source on GitHub ↗
(self, top_left: Point, entities: List[str])

Source from the content-addressed store, hash-verified

14
15class Depot():
16 def __init__(self, top_left: Point, entities: List[str]):
17 self.root = top_left
18 self.resource_roots: Dict[str, Point] = {}
19 self.resource_count: Dict[str, int] = {}
20 # keep track of how many "chunks"
21 self.height = 6
22 for idx, entity in enumerate(entities):
23 self.resource_roots[entity] = self.root + Point(2 * idx, 0)
24 self.resource_count[entity] = 0
25 width = len(self.resource_roots) * 3
26 height = 6
27 self.area = Rect(self.root, self.root + Point(width, height))
28
29 def address(self, entity: str, n: int) -> Point:
30 root = self.resource_roots[entity]

Callers

nothing calls this directly

Calls 2

PointClass · 0.90
RectClass · 0.90

Tested by

no test coverage detected