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

Method take

python/gather.py:45–51  ·  view source on GitHub ↗
(self, dog: Dog, entity: str)

Source from the content-addressed store, hash-verified

43 print(f"error, tried to store {entity}")
44
45 def take(self, dog: Dog, entity: str):
46 count = self.resource_count[entity]
47 if count > 0:
48 self.resource_count[entity] -= 1
49 address = self.address(entity, count)
50 dog.pick_known(entity, address)
51 dog.goto(self.root + Point(-1, -1))
52
53 def lowest_resource(self) -> str:
54 min_count = min(self.resource_count.values())

Callers

nothing calls this directly

Calls 4

addressMethod · 0.95
PointClass · 0.90
pick_knownMethod · 0.80
gotoMethod · 0.45

Tested by

no test coverage detected