2021-03-29 02:19:55 +02:00
|
|
|
class Field:
|
2021-04-13 21:34:48 +02:00
|
|
|
def __init__(self, horizontal_index, vertical_index, state):
|
|
|
|
self.__horizontal_index = horizontal_index
|
|
|
|
self.__vertical_index = vertical_index
|
|
|
|
self.__state = state
|
2021-03-29 02:19:55 +02:00
|
|
|
|
|
|
|
@property
|
|
|
|
def state(self):
|
|
|
|
return self.__state
|
|
|
|
|
2021-04-13 21:34:48 +02:00
|
|
|
@property
|
|
|
|
def horizontal_index(self):
|
|
|
|
return self.__horizontal_index
|
|
|
|
|
|
|
|
@property
|
|
|
|
def vertical_index(self):
|
|
|
|
return self.__vertical_index
|
|
|
|
|
2021-03-29 02:19:55 +02:00
|
|
|
@state.setter
|
|
|
|
def state(self, state):
|
2021-03-30 00:54:29 +02:00
|
|
|
if state == "toPlow" or state == "toWater" or state == "toSeed" or \
|
|
|
|
state == "toFertilize" or state == "toCut" or state == "TOOLS_FIELD" or state == "FUEL_FIELD":
|
2021-03-29 02:53:27 +02:00
|
|
|
self.__state = state
|