SIP/core/node.py

15 lines
458 B
Python
Raw Normal View History

2021-06-10 21:23:58 +02:00
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:
2021-05-14 14:52:55 +02:00
return False