(
self,
pos_x: int,
pos_y: int,
goal_x: int,
goal_y: int,
g_cost: int,
parent: Node | None,
)
| 42 | """ |
| 43 | |
| 44 | def __init__( |
| 45 | self, |
| 46 | pos_x: int, |
| 47 | pos_y: int, |
| 48 | goal_x: int, |
| 49 | goal_y: int, |
| 50 | g_cost: int, |
| 51 | parent: Node | None, |
| 52 | ) -> None: |
| 53 | self.pos_x = pos_x |
| 54 | self.pos_y = pos_y |
| 55 | self.pos = (pos_y, pos_x) |
| 56 | self.goal_x = goal_x |
| 57 | self.goal_y = goal_y |
| 58 | self.g_cost = g_cost |
| 59 | self.parent = parent |
| 60 | self.h_cost = self.calculate_heuristic() |
| 61 | self.f_cost = self.g_cost + self.h_cost |
| 62 | |
| 63 | def calculate_heuristic(self) -> float: |
| 64 | """ |
nothing calls this directly
no test coverage detected