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

Class Direction

python/utils.py:6–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4from random import randint
5
6class Direction(StrEnum):
7 N = "N"
8 S = "S"
9 E = "E"
10 W = "W"
11
12 def left(self) -> Self:
13 match self:
14 case "N":
15 return Direction.W
16 case "W":
17 return Direction.S
18 case "S":
19 return Direction.E
20 case "E":
21 return Direction.N
22
23 def right(self) -> Self:
24 match self:
25 case "N":
26 return Direction.E
27 case "E":
28 return Direction.S
29 case "S":
30 return Direction.W
31 case "W":
32 return Direction.N
33
34@dataclass
35class Point:

Callers 1

statMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected