SIP/core/node.py
2021-06-10 21:23:58 +02:00

15 lines
458 B
Python

class Node:
def __init__(self, x, y, angle = None, parent = None, action = 0, cost=0):
self.x = x
self.y = y
self.angle = angle
self.parent = parent
self.action = action
self.cost = cost
def __eq__(self, other):
if isinstance(other, Node) and (self.x == other.x and self.y == other.y and self.angle == other.angle):
return True
else:
return False