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

Method __init__

python/dog.py:14–24  ·  view source on GitHub ↗
(self, port: int)

Source from the content-addressed store, hash-verified

12class Dog(Agent):
13
14 def __init__(self, port: int):
15 # fake location to start
16 super().__init__(port, Point(-1, -1))
17 self.char_locations: Dict[str, Set[Point]] = defaultdict(set)
18 self.goto_recursion_count = 0
19 (location, _, _, _) = self.stat()
20 self.location: Point = location
21 self.facing: Direction = Direction.E
22 # TODO add these to init arguments
23 self.charge_location: Optional[Point] = None
24 self.depot_area: Rect = Rect(Point(0,0), Point(0,0))
25
26 def charge_if_needed(self):
27 (_, _, charge, _) = self.stat()

Callers

nothing calls this directly

Calls 3

statMethod · 0.95
PointClass · 0.90
RectClass · 0.90

Tested by

no test coverage detected