x = $x; $this->y = $y; $this->weight = $weight; $this->isWalkable = $isWalkable; } public function isWalkable() : bool { return $this->isWalkable; } public function getWeight() : float { return $this->weight; } public function getX() : int { return $this->x; } public function getY() : int { return $this->y; } public function setParent(?Node $node) : void { $this->parent = $node; } public function getParent() : ?Node { return $this->parent; } public function isEqual(Node $node) : bool { return $this->x === $node->getX() && $this->y === $node->getY(); } public function getCoordinates() : array { return ['x' => $this->x, 'y' => $this->y]; } }