24 lines
705 B
Python
24 lines
705 B
Python
class Field:
|
|
def __init__(self, horizontal_index, vertical_index, state):
|
|
self.__horizontal_index = horizontal_index
|
|
self.__vertical_index = vertical_index
|
|
self.__state = state
|
|
|
|
@property
|
|
def state(self):
|
|
return self.__state
|
|
|
|
@property
|
|
def horizontal_index(self):
|
|
return self.__horizontal_index
|
|
|
|
@property
|
|
def vertical_index(self):
|
|
return self.__vertical_index
|
|
|
|
@state.setter
|
|
def state(self, state):
|
|
if state == "toPlow" or state == "toWater" or state == "toSeed" or \
|
|
state == "toFertilize" or state == "toCut" or state == "TOOLS_FIELD" or state == "FUEL_FIELD":
|
|
self.__state = state
|