3d8c1c0641
Signed-off-by: Neerka <kuba.markil0220@gmail.com>
23 lines
477 B
Python
23 lines
477 B
Python
class Node:
|
|
def __init__(self, state):
|
|
self.state = state
|
|
self.action = ""
|
|
self.parent: Node = None
|
|
|
|
def getState(self):
|
|
return self.state
|
|
|
|
def getAction(self):
|
|
return self.action
|
|
|
|
def setAction(self, action):
|
|
self.action = action
|
|
return self
|
|
|
|
def getParent(self):
|
|
return self.parent if self.parent else False
|
|
|
|
def setParent(self, parent):
|
|
self.parent = parent
|
|
return self
|