2023-03-26 14:20:58 +02:00
|
|
|
from pygame.sprite import Sprite
|
2023-05-25 18:11:06 +02:00
|
|
|
from src.Plant import Plant
|
2023-03-26 14:20:58 +02:00
|
|
|
|
|
|
|
class Field(Sprite):
|
2023-05-14 18:24:15 +02:00
|
|
|
def __init__(self, type, x, y, image, cost, hydration_level , soil,
|
2023-05-25 18:11:06 +02:00
|
|
|
fertilizer_degree, development_degree, plant_type, fertilizer_type, to_water, plantObj):
|
2023-05-14 18:24:15 +02:00
|
|
|
super().__init__()
|
2023-03-26 14:20:58 +02:00
|
|
|
self.type = type
|
2023-05-14 18:24:15 +02:00
|
|
|
self.x = x
|
|
|
|
self.y = y
|
|
|
|
self.position = (x, y)
|
2023-03-26 14:20:58 +02:00
|
|
|
self.image = image
|
|
|
|
self.cost = cost
|
|
|
|
|
|
|
|
self.hydration_level = hydration_level
|
|
|
|
self.soil = soil
|
|
|
|
self.fertilizer_degree = fertilizer_degree
|
|
|
|
self.development_degree = development_degree
|
|
|
|
self.plant_type = plant_type
|
|
|
|
self.fertilizer_type = fertilizer_type
|
|
|
|
self.to_water = to_water
|
2023-05-25 18:11:06 +02:00
|
|
|
self.plantObj = plantObj
|
|
|
|
|
|
|
|
def getPlantObj(self):
|
|
|
|
return self.plantObj
|
|
|
|
|
|
|
|
def setPlantObj(self,newPlant):
|
|
|
|
self.plantObj=newPlant
|
2023-03-26 14:20:58 +02:00
|
|
|
|