13 lines
372 B
Python
13 lines
372 B
Python
class Node:
|
|
state = None #[{stan}]
|
|
parent = None #[Node]
|
|
action = None #[Forward/Right/Left]
|
|
|
|
def __init__(self, state):
|
|
self.state = state
|
|
|
|
def __lt__(self, other):
|
|
"""
|
|
Definicja metody __lt__ (less than), która jest wymagana do porównywania obiektów typu Node.
|
|
"""
|
|
return self.g + self.h < other.g + other.h |