(
self,
pos_x: int,
pos_y: int,
goal_x: int,
goal_y: int,
g_cost: float,
parent: Node | None,
)
| 54 | """ |
| 55 | |
| 56 | def __init__( |
| 57 | self, |
| 58 | pos_x: int, |
| 59 | pos_y: int, |
| 60 | goal_x: int, |
| 61 | goal_y: int, |
| 62 | g_cost: float, |
| 63 | parent: Node | None, |
| 64 | ): |
| 65 | self.pos_x = pos_x |
| 66 | self.pos_y = pos_y |
| 67 | self.pos = (pos_y, pos_x) |
| 68 | self.goal_x = goal_x |
| 69 | self.goal_y = goal_y |
| 70 | self.g_cost = g_cost |
| 71 | self.parent = parent |
| 72 | self.f_cost = self.calculate_heuristic() |
| 73 | |
| 74 | def calculate_heuristic(self) -> float: |
| 75 | """ |
nothing calls this directly
no test coverage detected