S
Size: a a a
S
q
@dataclass
class Node(Generic[N]):
name: Union[str, int]
neighbours: List[Neighbour]
position: Optional[Tuple[int, int]] = None
f: int = 0
g: int = 0
h: int = 0
@classmethod
def from_data(cls, name: Union[str, int], *args: Tuple[int, int]):
return cls(name=name,
neighbours=[Neighbour(cls, edge) for nodes, edge in args])
S
q
S
JC
I
q
SS
SS
I
JC
I
SS
q
SS
SS
JC
SS
JC