36 lines
796 B
Python
36 lines
796 B
Python
|
class AgentState:
|
||
|
def __init__(self, x, y, direction, predecessor = None):
|
||
|
self.__x = x
|
||
|
self.__y = y
|
||
|
self.__direction = direction
|
||
|
self.__predecessor = predecessor
|
||
|
|
||
|
def get_x(self):
|
||
|
return self.__x
|
||
|
|
||
|
def increment_x(self, value):
|
||
|
self.__x += value
|
||
|
|
||
|
def set_x(self, x):
|
||
|
self.__x = x
|
||
|
|
||
|
def get_y(self):
|
||
|
return self.__y
|
||
|
|
||
|
def increment_y(self, value):
|
||
|
self.__y += value
|
||
|
|
||
|
def set_y(self, y):
|
||
|
self.__y = y
|
||
|
|
||
|
def get_direction(self):
|
||
|
return self.__direction
|
||
|
|
||
|
def set_direction(self, direction):
|
||
|
self.__direction = direction
|
||
|
|
||
|
def get_predecessor(self):
|
||
|
return self.__predecessor
|
||
|
|
||
|
def set_predecessor(self, predecessor):
|
||
|
self.__predecessor = predecessor
|